Repository navigation
ci(gh-16): add an on-demand Windows installer test and move the release job self-hosted - #17
Open
oliver-cieliszak-natterbox wants to merge 7 commits into
Open
oliver-cieliszak-natterbox wants to merge 7 commits into
oliver-cieliszak-natterbox wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
🛠️ Fix a finding or handle a false positive
- Auto-Fix: Run
/orca-pr-scan-fixto automatically remediate or suppress PR findings. - In-Code: Suppress via inline comments or exception files (see CLI References).
- In Orca: Dismiss or snooze directly via Changing Alert Statuses.
A `shell:` field cannot be driven from a strategy matrix: GitHub rejects the workflow with "Unrecognized named-value: 'matrix'". Set `defaults.run.shell: pwsh` and give the two shell paths their own steps, with install.bat running under `shell: cmd`.
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.
What
Adds a dispatch-only Windows installer test workflow, moves
release.ymloff GitHub-hostedubuntu-latestonto the self-hosted Arm64 CodeBuild fleet, and fixes a Windows-only crash insetup.pythat the new test found on its first run.Why
release.ymlonubuntu-latestwas acicd-github-actions§1.3 MUST violation: a GitHub-hosted runner needs an immediately preceding# RUNNER-EXCEPTION:comment, and there was none.The Windows workflow exists because a real defect shipped in
install.ps1that nothing in CI could catch. The version check read the last whitespace token ofuv --version, which is the build target (x86_64-pc-windows-msvc)), not the version, so the "already installed, skip the download" branch was unreachable and every Windows re-run re-downloaded about 34 MB. Fixed in #15.The
setup.pycrash is what the first dispatch of that new test immediately found._ok(),_info()and_box()print a tick, an info glyph and box-drawing characters, and Python cannot encode those into a Windows pipe or redirected file, which uses a legacy code page. The installer dies withUnicodeEncodeErrorpart-way through. An interactive console hides it, because Python uses Unicode console I/O there; anything that captures output does not, which includes CI,install.ps1 | Tee-Object, and a scheduled task writing a log.How
The Windows job is
workflow_dispatchonly, with nothing on push or pull_request, because every run downloads uv and a managed CPython interpreter into fresh prefixes. Dispatch it against whichever branch you want to test. It reads the pinned version out ofdistro.tomlat run time rather than hardcoding it, prints both interpreters' versions so the log proves what actually ran, and fails if the second install re-downloads.PowerShell 7 invokes
install.ps1directly. Windows PowerShell 5.1 is exercised throughinstall.bat, which is the documented fallback for machines where script execution is blocked and is itself apowershell -ExecutionPolicy Bypasswrapper. Ashell:field cannot be driven from a strategy matrix, so those are separate steps rather than a matrix dimension.Two details in the assertion are deliberate, and both cost a failing run to learn.
Write-Hostoutput goes to the information stream, so the installer's messages are only visible with6>&1alongside2>&1; without it the check cannot see the installer at all. And the re-download check reads the output text rather thanuv.exe's timestamp, becauseinstall.ps1copies the binary out of the archive withCopy-Item, which preserves the archive's own timestamp, so a re-download of the same version leaves the write time unchanged.release.ymlmoves to the Arm64 fleet because the runner image isalmalinux:10and installs thezipCLI andgh2.102.0, which is everything this job uses, andredmatter/nbinternal-skillsalready creates releases with attached assets from the same fleet. It keeps thezipCLI rather than Python'szipfile, becausezippreserves the executable bit oninstall.shandzipfilewould not.setup.pynow reconfigures stdout and stderr to UTF-8 with areplacefallback before printing anything. UTF-8 keeps the glyphs readable in modern logs, and the fallback means an unprintable character can never abort an install again.Test Steps
gh workflow run test-windows-installer.yml --ref bugfix/gh-16-ci-runner-compliance, thengh run watch.PowerShell 7 - second install must skip rather than re-download, reportingthe second run re-downloaded uv: the skip branch did not fire. That is theinstall.ps1bug fix(gh-14): bump uv to 0.12.24 and fix the Windows version check #15 fixes, and catching it is the entire point of the job. Expect green once it is dispatched against a branch carrying fix(gh-14): bump uv to 0.12.24 and fix the Windows version check #15.release.ymlonly runs on tags, so it is first exercised at the next release. After merging, tagv0.12.1and confirm the run picks up a CodeBuild runner and publishes the ZIP.Other Notes
gitflow.ymlis deliberately unchanged. It declares noruns-on:of its own, and the reusable workflow it calls already defaults to that same Arm64 fleet, so it is self-hosted already.v1tag makesgit show v1:.github/workflows/gitflow.ymlreportubuntu-latestplusactions/setup-python, which is not what GitHub resolves. Usegit ls-remote --tags origin v1orgit fetch --tags --forcebefore drawing conclusions fromv1.zipCLI is present in the fleet image but is not yet exercised by any workflow in the org. A failure would occur beforegh release create, so the job fails closed rather than publishing a broken release.release.ymlhas no job-levelpermissions:block. §3.2 reads as a SHOULD gap; it is pre-existing, so it is left alone here rather than widening this change.setup.pyfix rides in this PR rather than its own, on the owner's call, so this branch carries one CI change and one installer fix.Closes #16