Repository navigation
ci: install keploy without writing install.sh in the checkout - #8
Merged
Merged
Conversation
The sandbox workflow's install step saved the installer as ./install.sh in the checkout with `curl --silent -O -L` and then ran it. A repository that tracks its own install.sh had it overwritten before any installer code ran, and without -f a failed download saved an error page there. The step now saves the installer to a temp file outside the checkout, runs it only once the whole file has arrived, removes it, and fails the step when the download (an HTTP error or a transfer cut off partway) or the installer fails. It is the line keploy's MCP now generates for this workflow. Signed-off-by: slayerjain <shubhamkjain@outlook.com>
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.
Installers: both installers already stopped touching the caller's folder: keploy/enterprise#3166 (released in v3.8.105, served at keploy.io/ent/install.sh) and keploy/keploy#5025 (merged 2026-11-01, served at keploy.io/install.sh). This PR fixes the commands themselves: their
curl -Osaved the installer into the working directory before any installer code ran. Nothing else has to merge first.What was wrong
The "Install keploy enterprise" step of
.github/workflows/keploy-sandbox.ymlran:curl -Osaves the installer as./install.shin the checkout before any installer code runs. A repository that tracks its owninstall.shhad it overwritten. Without-f, an HTTP error saved the error page there too, andbashthen ran it.The workflow is a copy of the one keploy's MCP generates (
scaffold_pipeline_workflow), which had the same lines.What changed
The step's first line is now:
-f, or a transfer cut off partway) or when the installer fails, so the job stops at the install step instead of going on with whatever keploy the runner has.keploy_rcso that under GitHub Actions'bash -ea failing installer still reaches therm.keploy --versionstays on the next line.Files touched
How it was checked
runline equals the generated line in keploy/api-server byte for byte.install.sh, with TMPDIR fresh, a stub installer served in place of the URL, on Linux amd64 under dash, bash 5.2 and zsh 5.9, in GitHub Actions'bash -e FILEshape and others, withbashand withsudo bash: success runs the installer (as root undersudo) and then the next line; a 404 fails the step with and withoutsudo, and so do a failing installer and a response cut off partway; after a failure the next line does not run.git statusstays empty and TMPDIR ends empty.Stated limits
keploy_rcandkeploy_sh.ubuntu-latest, where keploy lands in /usr/local/bin. On a macOS runner the installer puts it in~/.keploy/bin, which the step does not add to PATH.Same fix elsewhere
The same command is being replaced, one PR per repo, in keploy/keploy, keploy/enterprise, keploy/api-server, keploy/enterprise-ui, keploy/vscode-extension-enterprise, keploy/vscode-extension, keploy/docs, keploy/landing, keploy/homebrew-tap, keploy/orderflow, keploy/bruno, and the READMEs of keploy/samples-go, samples-python, samples-typescript, samples-csharp, samples-java and samples-rust. keploy/website and the JetBrains plugin also show the old command, but they are not live, so they were skipped.