fix(BUY-7843): separate gcloud stdout/stderr to fix jq parse error on staging deploy#33
Open
fix(BUY-7843): separate gcloud stdout/stderr to fix jq parse error on staging deploy#33
Conversation
… 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>
55535af to
67e7048
Compare
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. |
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.
Summary
jq: parse error: Invalid numeric literal(exit code 5) in the staging Deploy to Cloud Run stepgcloud run deploy --output json 2>&1 | jqmixes stderr progress messages with stdout JSON, breaking jq parsing/tmp/deploy_output.jsonand stderr to a separate file; parse JSON file with jq independentlyTest plan
Deploy to Cloud Runstep completes without jq parse error🤖 Generated with Claude Code