Fix release process not updating spec/dummy version in commit#971
Fix release process not updating spec/dummy version in commit#971
Conversation
The release process updates spec/dummy lockfiles before release-it runs, but release-it only reliably stages files it modifies (package.json). Other working tree changes like version.rb, Gemfile.lock, and spec/dummy lockfiles were not being included in the release commit. Add an explicit `git add -A` after all lockfile updates and before release-it runs, so all release-related changes are pre-staged and included in the release commit. Also updates spec/dummy/Gemfile.lock from 9.6.0 to 9.6.1 to fix the current CI failure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
WalkthroughThe pull request modifies the release rake task to explicitly stage version.rb, Gemfile.lock, and spec/dummy lockfiles (Gemfile.lock, yarn.lock, package-lock.json) before the release commit, replacing an implicit assumption that git add would automatically include all working tree changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR fixes a gap in the release process where file changes made before Key changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Rake as rake create_release
participant WC as with_release_checkout
participant Root as release_root
participant Dummy as spec/dummy
Rake->>WC: enter worktree (dry-run) or use gem_root
WC->>Root: git pull --rebase
Root->>Root: gem bump --no-commit
Root->>Root: bundle install
Root->>Dummy: bundle install
Root->>Dummy: yarn install
Root->>Dummy: npm install
Note over Root: NEW: git add -A<br/>Stages version.rb, Gemfile.lock,<br/>and spec/dummy lockfiles
Root->>Root: validate gem version
Root->>Root: release-it with --no-git.requireCleanWorkingDir
Note over Root: release-it commits all<br/>pre-staged files + package.json
Root->>Root: gem release
Last reviewed commit: bfe1dab |
ReviewThe fix is correct and well-motivated. A few observations: What works well:
One minor concern —
git add version.rb Gemfile.lock spec/dummy/Gemfile.lock spec/dummy/yarn.lock spec/dummy/package-lock.jsonThat said, this is a low-risk internal tooling script and
|
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Review: Fix release process not updating spec/dummy version in commitThe fix is correct and well-reasoned. A few observations for the record: What's good
Minor concern to watchThe explicit file list ( No issues
Overall: clean fix, low risk, correct behavior. ✓ |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88ad95de16
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Explicitly stage all release-related changes so release-it includes them in its commit. | ||
| # release-it only reliably stages files it modifies (package.json); other working tree | ||
| # changes (version.rb, Gemfile.lock, spec/dummy lockfiles) must be pre-staged. | ||
| Shakapacker::Utils::Misc.sh_in_dir(release_root, "git add version.rb Gemfile.lock spec/dummy/Gemfile.lock spec/dummy/yarn.lock spec/dummy/package-lock.json") |
There was a problem hiding this comment.
Stage the correct version file path
This staging command will fail on every release because version.rb is not a tracked path at the repo root (the gem version file is lib/shakapacker/version.rb), and git add exits non-zero when any pathspec is missing. In practice perform_release stops at this line with fatal: pathspec 'version.rb' did not match any files, so both dry-run and real releases abort before release-it runs.
Useful? React with 👍 / 👎.
### Summary Adds the v9.7.0 changelog section with release notes for all user-visible changes since v9.6.1: - **Added**: rspack v2 support (PR #975) - **Fixed**: Config exporter path traversal and annotation format validation (PR #914) - **Fixed**: `webpack-subresource-integrity` v5 named export handling (PR #978, fixes #972) Version diff links at the bottom of the file are updated accordingly. ### Pull Request checklist - [x] ~Add/update test to cover these changes~ - [x] ~Update documentation~ - [x] Update CHANGELOG file ### Other Information Non-user-visible PRs (#920, #965, #970, #971, #977, #979, #981, #982) were intentionally excluded per changelog policy. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only change updating `CHANGELOG.md`; no runtime code or dependency changes are introduced in this PR. > > **Overview** > Adds a new `v9.7.0` section to `CHANGELOG.md` documenting user-visible changes (rspack v2 support and two fixes around config export security/validation and `webpack-subresource-integrity` v5 exports). > > Updates the compare links at the bottom so `[Unreleased]` now compares from `v9.7.0`, and adds the new `[v9.7.0]` tag link. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 8942a43. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added rspack v2 support * **Bug Fixes** * Improved security and validation handling <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
### Summary Adds the v9.7.0 changelog section with release notes for all user-visible changes since v9.6.1: - **Added**: rspack v2 support (PR #975) - **Fixed**: Config exporter path traversal and annotation format validation (PR #914) - **Fixed**: `webpack-subresource-integrity` v5 named export handling (PR #978, fixes #972) Version diff links at the bottom of the file are updated accordingly. ### Pull Request checklist - [x] ~Add/update test to cover these changes~ - [x] ~Update documentation~ - [x] Update CHANGELOG file ### Other Information Non-user-visible PRs (#920, #965, #970, #971, #977, #979, #981, #982) were intentionally excluded per changelog policy. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only change updating `CHANGELOG.md`; no runtime code or dependency changes are introduced in this PR. > > **Overview** > Adds a new `v9.7.0` section to `CHANGELOG.md` documenting user-visible changes (rspack v2 support and two fixes around config export security/validation and `webpack-subresource-integrity` v5 exports). > > Updates the compare links at the bottom so `[Unreleased]` now compares from `v9.7.0`, and adds the new `[v9.7.0]` tag link. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 8942a43. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added rspack v2 support * **Bug Fixes** * Improved security and validation handling <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
release-itruns, butrelease-itonly reliably stages files it modifies (package.json). Other working tree changes (version.rb,Gemfile.lock,spec/dummylockfiles) were not being included in the release commit.git add -Aafter all lockfile updates and beforerelease-itruns, ensuring all release-related changes are pre-staged and included in the release commit.spec/dummy/Gemfile.lockfrom 9.6.0 to 9.6.1 to fix the current CI failure.Test plan
spec/dummy/Gemfile.lockbundle exec rake "create_release[9.6.2,true]"(dry run) to verify the release process stages all files correctly🤖 Generated with Claude Code
Note
Low Risk
Small change to release automation (adds explicit staging) plus a lockfile version bump; minimal runtime impact outside the release workflow.
Overview
Fixes the release rake task so the release commit reliably includes all version/lockfile changes. After bumping and updating
spec/dummydependencies, it now runsgit add -Abefore invokingrelease-it.Updates
spec/dummy/Gemfile.lockto referenceshakapacker9.6.1(from9.6.0).Written by Cursor Bugbot for commit bfe1dab. Configure here.
Summary by CodeRabbit
Bug Fixes