Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/setup-private-parsers/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
git config --global url."[email protected]:".insteadOf "https://github.com/"

echo "Fetching latest commit hash from v2 branch..."
LATEST_COMMIT=$(git ls-remote https://github.com/keploy/integrations.git refs/heads/v2 | awk '{print $1}')
LATEST_COMMIT=$(git ls-remote https://github.com/keploy/integrations.git refs/heads/sync-v2-with-v3 | awk '{print $1}')
if [ -z "$LATEST_COMMIT" ]; then
echo "Error: Failed to fetch latest commit hash from v2 branch"
exit 1
Expand All @@ -41,7 +41,7 @@ runs:
echo "Fetching private integrations dependency via SSH..."
GOPRIVATE=github.com/keploy/integrations go get github.com/keploy/integrations@$LATEST_COMMIT

echo "Creating extraparsers.go..."
echo "Creating extraparsers.go..."
mkdir -p pkg/core/proxy
cat <<'EOF' > pkg/core/proxy/extraparsers.go
//go:build linux
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prepare_and_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ jobs:
steps:
- name: Upload latest release
run: |
TAG=$(curl -s https://api.github.com/repos/keploy/keploy/releases | jq -r '[.[] | select(.tag_name | startswith("v2"))][0].tag_name')
TAG=$(curl -fsSL "https://api.github.com/repos/keploy/keploy/releases/latest" | jq -r '.tag_name')
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is triggered only on the v2 branch and previously explicitly selected a tag_name starting with v2. Switching to the /releases/latest endpoint removes that constraint and can fetch a non-v2 release (e.g., v3) if it becomes the latest, causing the workflow to download an incompatible artifact. Consider keeping the v2 filter (with pagination if needed) or at least validate TAG starts with v2 and fail with a clear error if it doesn’t.

Suggested change
TAG=$(curl -fsSL "https://api.github.com/repos/keploy/keploy/releases/latest" | jq -r '.tag_name')
TAG=$(curl -fsSL "https://api.github.com/repos/keploy/keploy/releases/latest" | jq -r '.tag_name')
if [[ "$TAG" != v2* ]]; then
echo "ERROR: Latest release tag '$TAG' is not a v2.* tag; refusing to download incompatible artifact." >&2
exit 1
fi

Copilot uses AI. Check for mistakes.
URL="https://github.com/keploy/keploy/releases/download/${TAG}/keploy_linux_amd64.tar.gz"
curl -L "$URL" -o keploy.tar.gz
curl -fL --retry 3 --retry-delay 2 "$URL" -o keploy.tar.gz
tar -xzf keploy.tar.gz
chmod +x keploy
- uses: actions/upload-artifact@v4
Expand Down
Loading