Repository navigation
fix(release): 🐛 install borrowed changelog bundles before the changelog exec - #68
Merged
Merged
Conversation
Coverage Report for CI Build 44692512223Coverage increased (+0.1%) to 86.863%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions24 previously-covered lines in 3 files lost coverage.
Coverage Stats
💛 - Coveralls |
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 #67 — kettle-release now installs the borrowed bundles before the changelog step execs them, so a release works from a cold gem home (e.g. right after a Ruby upgrade).
Root cause
The release materializes the bundles it owns (member
Gemfile,Appraisal.root.gemfile) up front, but the changelog step execs two borrowed bundles it never installed:release_changelog_gemfile— the kettle-changelog checkout'sgemfiles/release.gemfileasBUNDLE_GEMFILE)changelog_coverage_gemfile— exec'd by kettle-changelog's coverage step)bundle execnever auto-installs, so on a fresh gem home the changelog step died withBundler::GemNotFound(observed on the 3.1.31 release attempt: the structuredmerge 7.1.17 set pinned by the tool bundle was absent from the new Ruby's gem home). Ordering matters: the changelog runs in step 0 and needs the coverage bundle early, before any appraisal installs happen.Change
run_pre_release_checks!now callsmaterialize_borrowed_changelog_bundles!beforerun_changelog!:bundle installwithBUNDLE_GEMFILEset.BUNDLE_LOCKFILEundertmp/kettle-release/lockfiles/— the existing release-task copy when the bundle has a canonical lockfile, a fresh tmp path otherwise, so no canonical lockfile is ever written or created in the repo.bundle installis a fast no-op on a warm machine, so this is unconditional when the changelog step runs (skipped with--skip-changelog).Tests
4 new specs: both bundles install before the changelog exec with disposable lockfiles; a lockfile-less borrowed bundle installs against a tmp lockfile leaving the repo clean; no installs when the changelog runs from the ambient bundle; no installs when the step is skipped. 4 existing
run_pre_release_checks!specs gained a generalrun_cmd!allowance (they run against the real repo root, which has a coverage bundle that now — correctly — gets an install call first).Full suite green (968 examples); member lint clean.