Skip to content

build: limit sdist contents to source and metadata files#892

Merged
vdusek merged 1 commit into
masterfrom
build/limit-sdist-contents
May 12, 2026
Merged

build: limit sdist contents to source and metadata files#892
vdusek merged 1 commit into
masterfrom
build/limit-sdist-contents

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented May 12, 2026

Summary

Mirrors apify/crawlee-python#1890.

The latest crawlee-python beta release failed when uploading the sdist:

400 Bad Request — Project size too large. Limit for project 'crawlee' total size is 10 GB.

pyproject.toml only configured the wheel target, so hatchling's default sdist bundled the entire repo. Each released sdist was much larger than the actual source. Combined with the fact that a beta release is published on every src-touching commit to master, the cumulative storage quota on PyPI hit the cap fast.

This PR applies the same fix here: an explicit [tool.hatch.build.targets.sdist] that ships only src/apify and standard metadata files (CHANGELOG.md, CONTRIBUTING.md, LICENSE, README.md, pyproject.toml). Verified locally: built sdist is ~96 KB and contains only those files.

Tests are intentionally excluded — they need dev-only deps that aren't installable from a plain sdist anyway.

Note

PyPI's cap is cumulative across all uploaded files, so the eventual mitigation requires a project size limit increase once a project hits its quota. This PR just keeps future releases from chewing through quota.

Mirrors apify/crawlee-python#1890. Without an explicit sdist target,
hatchling bundles the whole repo, ballooning the released sdist and
risking exhaustion of PyPI's cumulative project size quota on beta
releases.
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels May 12, 2026
@vdusek vdusek self-assigned this May 12, 2026
@vdusek vdusek requested a review from janbuchar May 12, 2026 08:46
@github-actions github-actions Bot added this to the 140th sprint - Tooling team milestone May 12, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.04%. Comparing base (1e04431) to head (c6d4666).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #892   +/-   ##
=======================================
  Coverage   87.04%   87.04%           
=======================================
  Files          48       48           
  Lines        2942     2942           
=======================================
  Hits         2561     2561           
  Misses        381      381           
Flag Coverage Δ
e2e 37.72% <ø> (ø)
integration 59.07% <ø> (ø)
unit 75.76% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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 merged commit 3cfc8de into master May 12, 2026
31 checks passed
@vdusek vdusek deleted the build/limit-sdist-contents branch May 12, 2026 09: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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants