Skip to content

fix(dataset): preserve push_data compatibility with the released Apify SDK - #2152

Merged
vdusek merged 2 commits into
masterfrom
fix-dataset-client-sequence-check-shim
Aug 12, 2026
Merged

fix(dataset): preserve push_data compatibility with the released Apify SDK#2152
vdusek merged 2 commits into
masterfrom
fix-dataset-client-sequence-check-shim

Conversation

@vdusek

@vdusek vdusek commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

The scheduled E2E tests fail on every matrix job (all 90) with:

AttributeError: 'ApifyDatasetClient' object has no attribute '_is_sequence_of_items'

DatasetClient._is_sequence_of_items was removed in #2145. The released Apify SDK (up to 4.0.1) still calls it from ApifyDatasetClient.push_data, inheriting it from this base class, so a master wheel paired with the published SDK raises on every push_data. The templates E2E test builds exactly that pairing. Published crawlee 1.9.1 predates the removal, so this is not only a CI problem: the next crawlee release would carry the same break to every Actor resolving apify<=4.0.1.

This restores the helper on DatasetClient, annotated -> bool rather than TypeIs[...]. The narrowing is what ty 0.0.69 objected to in the first place, and no push_data implementation here uses the helper anymore, they keep the inlined isinstance. Drop it in the next major version, once those SDK versions are out of the supported range.

Verified by installing the built wheel alongside apify==4.0.1 and confirming the SDK call site resolves; swapping in the unpatched base class reproduces the failure above.

Failing run: https://github.com/apify/crawlee-python/actions/runs/31554176158

✍️ Drafted by Claude Code

@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels Aug 12, 2026
@vdusek vdusek self-assigned this Aug 12, 2026
@github-actions github-actions Bot added this to the 147th sprint - Tooling team milestone Aug 12, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Aug 12, 2026
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.64%. Comparing base (7f75295) to head (dbb267d).

Files with missing lines Patch % Lines
...c/crawlee/storage_clients/_base/_dataset_client.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2152      +/-   ##
==========================================
+ Coverage   93.62%   93.64%   +0.02%     
==========================================
  Files         181      181              
  Lines       12649    12653       +4     
==========================================
+ Hits        11842    11849       +7     
+ Misses        807      804       -3     
Flag Coverage Δ
unit 93.64% <75.00%> (+0.02%) ⬆️

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.

@vdusek vdusek changed the title fix(storage-clients): restore DatasetClient._is_sequence_of_items for released Apify SDK versions fix(dataset): preserve push_data compatibility with the released Apify SDK Aug 12, 2026
@vdusek
vdusek requested a review from Pijukatel August 12, 2026 09:22
@vdusek
vdusek marked this pull request as ready for review August 12, 2026 09:22
@Pijukatel
Pijukatel self-requested a review August 12, 2026 11:21

@Pijukatel Pijukatel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Stagehand templates are still failing (Maybe another issue)
https://github.com/apify/crawlee-python/actions/runs/31583394515/job/94071500831

@vdusek

vdusek commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator Author

Stagehand:

ImportError: cannot import name 'AsyncStagehand' from 'stagehand'
(/usr/local/lib/python3.13/site-packages/stagehand/init.py)

So it's not related to this one, I'll resolve it as separate PR, and same for the alerting.

@vdusek
vdusek merged commit 091410f into master Aug 12, 2026
120 of 127 checks passed
@vdusek
vdusek deleted the fix-dataset-client-sequence-check-shim branch August 12, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants