Skip to content

fix(BUY-7843): separate gcloud stdout/stderr to fix jq parse error on staging deploy#33

Open
BuyWhere wants to merge 1 commit intomainfrom
fix/BUY-8018-staging-pg-pool-max
Open

fix(BUY-7843): separate gcloud stdout/stderr to fix jq parse error on staging deploy#33
BuyWhere wants to merge 1 commit intomainfrom
fix/BUY-8018-staging-pg-pool-max

Conversation

@BuyWhere
Copy link
Copy Markdown
Owner

@BuyWhere BuyWhere commented May 3, 2026

Summary

  • Fixes jq: parse error: Invalid numeric literal (exit code 5) in the staging Deploy to Cloud Run step
  • Root cause: gcloud run deploy --output json 2>&1 | jq mixes stderr progress messages with stdout JSON, breaking jq parsing
  • Fix: redirect stdout to /tmp/deploy_output.json and stderr to a separate file; parse JSON file with jq independently

Test plan

  • Merge and trigger "Deploy to Cloud Run (Staging)" workflow
  • Confirm Deploy to Cloud Run step completes without jq parse error
  • Confirm k6 load test runs and reports <5% error rate
  • Close BUY-7843 when k6 is green

🤖 Generated with Claude Code

… deploy

gcloud run deploy with --output json writes progress messages to stderr
and JSON to stdout. Piping 2>&1 into jq caused 'Invalid numeric literal'
parse error (exit code 5) because non-JSON stderr lines prefixed the JSON.

Fix: redirect stdout to /tmp/deploy_output.json and stderr to a separate
file, then parse the clean JSON file with jq independently.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@BuyWhere BuyWhere force-pushed the fix/BUY-8018-staging-pg-pool-max branch from 55535af to 67e7048 Compare May 3, 2026 10:05
@richmondteo-code
Copy link
Copy Markdown

Rebased onto main — now mergeable

This unblocks BUY-7843 and BUY-7087 (staging API load test with 29.7% error rate).

After merge: trigger staging Cloud Run deploy, then run k6 validation with real auth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants