Run build & twine upload in afterPublish instead of afterRelease - #1945
Merged
Merged
Conversation
auto's exec plugin passes every hook argument as a JSON-encoded ARG_<n> environment variable. afterRelease's single argument carries all commits in the release (with a full GitHub user record per PR commit), the release notes and the GitHub release response, so for larger releases it exceeds Linux's 128KiB per-string limit (MAX_ARG_STRLEN) and the command fails with "spawnSync /bin/sh E2BIG" before it even starts, although "python -m build && twine upload dist/*" never uses it (intuit/auto#1294). afterPublish takes no arguments, so no ARG_* variables are set. It runs in "auto shipit" right after git-tag has created and pushed the new tag, so the version derived from the tag is the same; the only difference is that PyPI upload now happens before, rather than after, the GitHub release is created. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W872omgTVzywQbbjRvCX6q
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1945 +/- ##
==========================================
- Coverage 78.34% 78.33% -0.01%
==========================================
Files 92 92
Lines 14109 14109
==========================================
- Hits 11053 11052 -1
- Misses 3056 3057 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
CI note: two red checks on d04b352, neither caused by this PR (it changes only
Generated by Claude Code |
Member
|
We should try! first I will merge this with release to see that all still works as expected! then idelly we aggregate lots of changes to test if it actually addresses the issue for us! ;-) |
yarikoptic
approved these changes
Sep 30, 2026
|
🚀 PR was released in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A one-line
.autorcchange to work around intuit/auto#1294 (spawnSync /bin/sh E2BIGfrom theexecplugin).Why
execplugin puts every hook argument into the environment as JSON inARG_<n>.afterRelease's argument holds:MAX_ARG_STRLEN), however much of the 2 MiB total (ARG_MAX) is left. So once a release has roughly 90 or more PR commits,execSyncfails beforepython -m build && twine upload dist/*even starts, although that command never readsARG_0.What changes
afterPublishtakes no arguments, so noARG_*variables are set and this failure can't happen.auto shipitit runs right afterpublish: protected-branch has pushed its release branch and git-tag has pushed the new tag. The version the build derives from the tag is therefore the same as before.releasedposts its comments. So if twine fails, no GitHub release is made for an unpublished version.afterReleasecleanup of its temporary release branch doesn't run. That branch would need deleting by hand.How to test
releaselabel, so merging it doesn't release anything.minorchange (Remove deprecated validate-bids command #1943). The next release, whether from a PR labelledreleaseor a manualworkflow_dispatchof "Auto-release on PR merge", becomes 0.81.0 and exercises this change.-vvlog, expect: tag pushed → "Calling after publish hook" → build/twine output → GitHub release created.An upstream fix for auto (oversized args go to a temp file exposed as
ARG_<n>_FILE) is proposed in yarikoptic/intuit-auto#1.🤖 Generated with Claude Code
https://claude.ai/code/session_01W872omgTVzywQbbjRvCX6q
Generated by Claude Code