Skip to content

refactor!: take request lock durations in seconds - #1199

Closed
Pijukatel wants to merge 2 commits into
masterfrom
claude/wonderful-archimedes-088txx-3
Closed

Pijukatel wants to merge 2 commits into
masterfrom
claude/wonderful-archimedes-088txx-3

Conversation

@Pijukatel

Copy link
Copy Markdown
Contributor

RequestQueueClient.list_and_lock_head() and prolong_request_lock() now take lock_secs: int, matching the lockSecs query parameter they send, instead of a lock_duration timedelta.
The value is passed through unchanged, so there is no conversion step between the caller and the request.
Integration tests are updated and new unit tests check the query parameter for both methods in the sync and async client.


Generated by Claude Code

BREAKING CHANGE: `RequestQueueClient.list_and_lock_head()` and `prolong_request_lock()` take `lock_secs: int` instead of `lock_duration: timedelta`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuALBprYy13aVai5MaVb
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 4, 2026
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.90%. Comparing base (1790b0e) to head (a72ff1d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1199      +/-   ##
==========================================
- Coverage   95.68%   90.90%   -4.79%     
==========================================
  Files          62       62              
  Lines        6651     6650       -1     
==========================================
- Hits         6364     6045     -319     
- Misses        287      605     +318     
Flag Coverage Δ
integration ?
unit 90.90% <ø> (+0.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@apify-factory apify-factory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nothing blocking.

Compared with:

🏭 Factory review — ℹ️ not auto-approved

This change was reviewed but cannot be auto-approved: a gate failed, so the review cannot end in an approval.

check result
Static gates ❌ 14/16 — pr-open-and-ready, pr-title
Review findings ✅ none
Reviewer escalation ❌ This intentionally breaks the public signatures of list_and_lock_head() and prolong_request_lock() (lock_duration: timedelta becomes lock_secs: int), so a maintainer should confirm the major-version plan and the follow-up SDK update.
Juror 1 — claude-sonnet-5-5, adversarial ⏭️ skipped — a gate failed
Why it was not auto-approved

Failed gates:

  • pr-open-and-ready: PR is a draft
  • pr-title: breaking changes are never auto-approved

The comments above are the review itself; this section only explains the approval decision. Push a change and request @apify-factory again to re-run it, or ask a human to review.

Reviewed 03ef238ac · workflow run

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuALBprYy13aVai5MaVb

@apify-factory apify-factory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one note on the SDK.

🏭 Factory review — ℹ️ not auto-approved

This change was reviewed but cannot be auto-approved: a gate failed, so the review cannot end in an approval.

check result
Static gates ❌ 14/16 — pr-open-and-ready, pr-title
Review findings ❌ not clean
Reviewer escalation ❌ Intentional breaking change to the public RequestQueueClient signatures that the Python SDK's shared request queue client depends on.
Juror 1 — claude-sonnet-5-5, adversarial ⏭️ skipped — a gate failed
Why it was not auto-approved

Failed gates:

  • pr-open-and-ready: PR is a draft
  • pr-title: breaking changes are never auto-approved

The comments above are the review itself; this section only explains the approval decision. Push a change and request @apify-factory again to re-run it, or ask a human to review.

Reviewed a72ff1d72 · workflow run

@@ -732,7 +730,7 @@ async def list_head(self, *, limit: int | None = None, timeout: Timeout = 'short
async def list_and_lock_head(
self,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the Python SDK still calls list_and_lock_head(lock_duration=...) and prolong_request_lock(..., lock_duration=...) with a timedelta, so on this client version every shared request-queue fetch fails with TypeError: unexpected keyword argument. The SDK has to switch to lock_secs=int(...total_seconds()) in step with this release. (apify-sdk-python src/apify/storage_clients/_apify/_request_queue_shared_client.py:659)

@Pijukatel

Copy link
Copy Markdown
Contributor Author

Testing the AI review. Seems ok.

@Pijukatel Pijukatel closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants