fix(ci): make the release gate start and pass on Windows - #1431
Conversation
…lares The first v2.17.2 tag build ended in startup_failure with no jobs run: The workflow is not valid. .github/workflows/build.yml (Line: 59, Col: 3): Error calling workflow 'lint-and-test.yml'. The workflow is requesting 'security-events: write', but is only allowed 'security-events: none'. lint-and-test.yml declares security-events: write at workflow level for its govulncheck SARIF upload. The gate job added in #1409 calls it with only the three read scopes it needs, and GitHub validates a called workflow's declared permissions against the caller's grant before any job starts, whether or not the step that uses them will run. The gate skips the SARIF upload, but the declaration is what is checked. Grant it on the gate job. Nothing in the gate run uses the scope. The gate has never run on a real tag before this: #1409 landed after v2.17.1, and build-check.yml, which would have exercised the same call, has been failing at startup on main since 2026-08-31. (cherry picked from commit d7f08f0)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe build workflow grants ChangesWorkflow Permission Update
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The release gate now has the permission required for the reusable lint-and-test workflow to start and upload SARIF when applicable. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
TestScrapeLoop_AccumulatesSourceLoadFailures failed on the v2.17.2 release gate's Windows job: Error "misterdocs: load \"media\\\\fat\\\\docs\\\\SNES\\\\Artwork One\": ..." does not contain "media\\fat\\docs\\SNES\\Artwork One" scrapeLoop formats each failed source path with %q, which escapes the backslashes in a Windows path, while the test searched the error for the raw path. Forward slashes need no escaping, so the assertion only held on Linux and macOS. Compare against strconv.Quote of the path, which is what %q produces. (cherry picked from commit 2b5190a)
The v2.17.2 tag build passed its gate and built every target, then Windows signing failed: Build artifact cannot be signed because of continuous integration system setup validation errors: At least one job that had an impact on the artifact creation was executed on a non-github-hosted runner but only GitHub hosted runners are allowed. The job "lint-and-test / CI (ubuntu, ubicloud-standard-4)" was executed on a runner group "Default" that is not allowed. SignPath's policy for this project accepts artifacts only when every job upstream of them ran in the "GitHub Actions" runner group. Before #1409 the build job had no dependency on lint-and-test.yml, so the Ubicloud runner its Linux job uses was never part of a release's chain. The gate made it one. Pick ubuntu-latest for that job when release_gate is set. Pull requests and pushes to main keep the Ubicloud runner, and every other job the gate runs is already GitHub-hosted. (cherry picked from commit e508758)
startup_failurewith no jobs run. GitHub rejected build.yml with: "Error calling workflow 'lint-and-test.yml'. The workflow is requesting 'security-events: write', but is only allowed 'security-events: none'."security-events: writeat workflow level for its govulncheck SARIF upload. The release gate job added in fix(test): unblock Windows and macOS CI, and gate releases on it #1409 calls it granting onlycontents,pull-requestsandpackagesread, and GitHub validates a called workflow's declared permissions against the caller's grant before any job starts, whether or not the step that uses them will run.security-events: writeon the gate job. Nothing in a gate run uses it, because therelease_gateinput already skips the SARIF upload.TestScrapeLoop_AccumulatesSourceLoadFailuresfrom fix(scraper): follow the MiSTer artwork pack format #1429.scrapeLoopformats each failed source path with%q, which escapes the backslashes in a Windows path, while the test searched the error for the raw path. The assertion now compares againststrconv.Quoteof the path, which is what%qproduces.ubicloud-standard-4. Before fix(test): unblock Windows and macOS CI, and gate releases on it #1409 the build job had no dependency on lint-and-test.yml, so that runner was never in a release's chain. The gate now runs its Linux job onubuntu-latest; pull requests and pushes to main keep the Ubicloud runner.release/v2.17.2, where the v2.17.2 tag points at the last one.