fix(ci): Make install-test HTTP server startup deterministic#145
Merged
Conversation
The fixed 2s sleep before running install.ps1 was not reliable on the windows-latest runner: when the Python http.server had not started yet, the install script failed with "connection actively refused". The failure was masked until #143 surfaced install.ps1 exit codes. - Replace the fixed sleep with a 30s readiness poll that fails loudly and dumps the server log when the server never becomes reachable. - Add actions/setup-python so the runner has a known-good Python on PATH regardless of windows-latest image migrations. - Extract the duplicated server-startup and binary-verification logic into two composite actions (cli/serve-archive, cli/verify-installed-binary), used by all three install-test jobs. - Standardize on http://127.0.0.1:8080 across platforms. - Allow .github in .gitignore so the new composite actions are tracked despite the broad .* hidden-file rule.
3ed5819 to
bc7ffe8
Compare
…ogic
The previous fix split the windows-latest install-test into a "serve
archive" step plus a "run install.ps1" step. The python http.server
started in the first step was killed by the runner's Job Object at step
end, so install.ps1 in the next step hit "connection actively refused".
- Inline the python server start, readiness poll and install.ps1 invocation
into a single step in test-install-ps1. Add an inline comment recording
why the step cannot be split.
- Extract the readiness-poll algorithm into scripts/ci/wait-for-http-server.{sh,ps1}
so each shell has one canonical implementation. cli/serve-archive now
delegates to the bash helper; the Windows step calls the pwsh helper.
- Reject windows-latest from cli/serve-archive with a clear error pointing
callers at the inline pattern.
- Parameterize the Windows step's SERVE_PORT and SERVE_TIMEOUT through env
so the constants live in one place per call site.
The install-test jobs still inlined per-OS build commands and the parse logic that translates an install script's OPENTAINT_BINARY_PATH line into a step output. Pull those out so each job reads as a declarative step list. - Add cli/build-test-archive composite action that handles the three per-OS build + checksum recipes behind one uses: call. - Add scripts/ci/run-installer-sh.sh and run-installer-pwsh.ps1 that run an install script, echo its output, and propagate OPENTAINT_BINARY_PATH to GITHUB_OUTPUT. The bash and pwsh install-test jobs each have one canonical implementation of this parse rule now. - Rewrite the three install-test jobs around these helpers; the Windows step still inlines server orchestration due to the Job Object constraint, but everything else collapses to uses: / script calls.
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.
No description provided.