Stop building and testing twice in bv release - #395
Conversation
`ReleaseCommand` ran the build pipeline from Clean through Test before the release commit, and from Restore through Pack after it. The second run built and tested the tree of the release commit, which is the tree the release tags and publishes. The first run tested a tree that differs from it only by `VERSION`, the public API files, and `CHANGELOG.md`. The pair dates from the Cake.Frosting port, where `ReleaseTask` depended on `TestTask` and kept a pipeline run of its own. The pipeline runs once, after the release commit, from Clean through Pack. A build or test failure then rolls back the release commit and the draft release, like any later failure. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
@claude please review this PR. |
|
Claude finished @rdeago's task in 5m 49s —— View job Review
No blocking findings. The single run still covers what the two runs covered. The move also makes one line of Non-blockingReported once, per Nothing pins the range of the run. The gap predates this PR for the No test covers a pipeline failure. The PR moves build and test failures inside the rollback scope, and the description states the new outcome: a failing build rolls back the release commit and the draft release. • branch |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #395 +/- ##
=======================================
Coverage 82.83% 82.84%
=======================================
Files 278 278
Lines 8314 8313 -1
Branches 1618 1618
=======================================
Hits 6887 6887
+ Misses 1151 1150 -1
Partials 276 276 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
`ReleaseHarness` records a `ReleaseEvent` per child process. `Clean` starts none, and `Test` starts none either, because `ReleaseHarness` writes `Test.slnx` without a project. `Release_RunsPipelineOnce_ThenPushesAndPublishes` therefore passed whether `ReleaseCommand` ran the build pipeline from `Clean` or from `Restore`. The four tests that assert an empty event list could not tell a refused release from one that had cleaned. `BuildPipeline` begins a reporter activity named after each step, so `ReleaseHarness.PipelineSteps` reads the steps back from `CaptureReporter.ActivityTitles`. `Release_RunsPipelineOnce_ThenPushesAndPublishes` asserts the five steps, and the four tests assert none. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Round 1. Nothing pins the range of the run. Done in 4436eca. No test covers a pipeline failure. Left alone.
A |
Checklist of related issues / discussions
Proposed changes
bv releaseran the build pipeline twice: fromcleanthroughtestbefore the release commit, and fromrestorethroughpackafter it.The second run built and tested the tree of the release commit, which is the tree the release tags and publishes.
The first run tested a tree that differs from it only by
VERSION, the public API files, andCHANGELOG.md.In the release of 2.1.727-preview, the first run took 1 min 41 s of the command's 3 min 17 s.
The two runs date from the Cake.Frosting port, where
ReleaseTaskdepended onTestTaskand kept a pipeline run of its own.bv releaseruns the pipeline once, fromcleanthroughpack, after the release commit.The preliminary checks, the draft release, the release commit, and the tag check all come before any build, so a release that cannot succeed is refused before there is anything to roll back.
A build or test failure rolls back the release commit and the draft release, as a pack, push, or publish failure already did.
The draft release is created "so if the token has no permissions we can bail out early".
That check used to come after a full pipeline run.
With one run, it comes before any build.
The tests, the page
docs/tool-commands/release.md, and the changelog follow the new order.Additional changes
Release_WithEmptySectionAndNoSubstitute_Failsasserts that no pipeline step ran, where it asserted only thatpackdid not.Its comment claimed the stronger fact already, and the fact holds once the pipeline runs after the changelog check.
Types of changes
This pull request introduces the following types of changes:
.gitattributes,.gitignore)Breaking changes
This pull request introduces breaking changes:
Checklist
🤖 Generated with Claude Code