fix(release): rebuild the web bundle when the release PR bumps versions - #353
Merged
Merged
Conversation
The release PR bumps apps/pythinker-web's version, which Vite compiles into the bundle, so the committed dist-web went stale and build, test, nix and preview publish all failed. version:release now runs build:web after changeset version. Also stop the tower roster test from assuming the order of two log lines written by independent async handlers.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 14 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: PyModel/pythinker-code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
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 |
commit: |
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.
Requirement or Bug
The release PR (#348) fails
build,test,nix build,Artifact securityand the preview publish.Bug Reproduction Steps
@pymodel/pythinker-web.ci: release packages, which bumpsapps/pythinker-web/package.jsonversion.check-web-assets.mjsfails: "The committed web bundle is stale".Root Cause
vite.config.tscompiles the web package version into the bundle (__PYTHINKER_WEB_VERSION__), andpackage.jsonis a fingerprinted build input.changeset versionbumps it but nothing rebuiltdist-web, so the committed bundle was genuinely stale. Earlier releases (#301) were fixed by rebuilding by hand on the release branch. Fundamental fix:version:releasenow runspnpm run build:webafterchangeset version, so the changesets action commits the rebuilt bundle with the bump. The release job already installs dependencies and runspnpm buildbefore this step.Second, unrelated failure in the same run:
towerService.test.ts"leaves the roster untouched when another session owns the tower store" asserted the order of two log lines written by two independent async event handlers. It failed on CI when the order flipped. The test now checks both lines without order and finds the payload by message.Code Changes
package.json:version:releaseappends&& pnpm run build:web.towerService.test.ts: order-independent assertion.Behavior Changes and Affected Users
None for users. Release PRs now include the rebuilt
dist-webwhenever a version that reaches the bundle changes; the release job takes about one web build longer.Verification:
9.9.9. The stale check failed; afterpnpm run build:webit passed, and the new version appears in the bundle. Then I reverted.towerService.test.tspasses: 108 of 108.Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.