fix(ci): handle git push race condition in Rust CI/CD release#260
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #259
The Rust auto-release job was failing with "non-fast-forward" rejection when the JS CI/CD pipeline pushed a version commit to main concurrently. Changes: - Add fetch/rebase before committing in rust-version-and-commit.mjs - Add push retry with pull --rebase on failure (up to 3 attempts) - Add shared concurrency group (release-main) across Rust and JS release jobs to serialize pushes to main Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Case study with timeline, root cause analysis, and template comparison - CI logs preserved for reference - Changelog fragments for both Rust and JS changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $4.732787📊 Context and tokens usage:Claude Opus 4.6:
Total: (93.2K + 6.6M cached) input tokens, 20.2K output tokens, $4.389263 cost Claude Haiku 4.5: Total: (99.5K + 1.7M cached) input tokens, 10.0K / 64K (16%) output tokens, $0.343524 cost 🤖 Models used:
📎 Log file uploaded as Gist (3308KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Contributor
Author
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This reverts commit 4023c4c.
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.
Summary
Fixes #259
The Rust CI/CD auto-release pipeline was failing when merging PRs to main because the JS CI/CD pipeline would push a version commit concurrently, causing a non-fast-forward rejection.
Root Causes (from CI log analysis)
Git push race condition (CI run 24331934514):
rust-version-and-commit.mjsdid a plaingit pushwithout pulling remote changes first. When the JS release job pushed to main concurrently, the Rust push was rejected.CARGO_REGISTRY_TOKEN not set (CI run 24328743522): Previously fixed in commit f675128 by adding
CARGO_TOKENfallback.Changes
scripts/rust-version-and-commit.mjs: Addedgit fetch origin main+ rebase before committing, and push retry loop (up to 3 attempts) withgit pull --rebaseon failure.github/workflows/rust.yml: Addedconcurrency: { group: release-main, cancel-in-progress: false }to auto-release and manual-release jobs.github/workflows/js.yml: Added same concurrency group to release and instant-release jobsdocs/case-studies/issue-259/: Case study with timeline, root cause analysis, and template comparisonTemplate Repo Issue Filed
The same race condition bug exists in the template: link-foundation/rust-ai-driven-development-pipeline-template#31
Test plan
node --check)🤖 Generated with Claude Code