Skip to content

Retry transient release/module downloads in smoke.sh - #37

Merged
kixelated merged 1 commit into
mainfrom
claude/github-actions-workflow-fix-3c54fd
Sep 14, 2026
Merged

kixelated merged 1 commit into
mainfrom
claude/github-actions-workflow-fix-3c54fd

Conversation

@kixelated

Copy link
Copy Markdown
Contributor

Fixes the three red lanes in https://github.com/moq-dev/smoke/actions/runs/34857588399, which were three unrelated network blips (moxygen's FAIL is the known continue-on-error one):

  • cargo: libmoq tarball truncated mid-stream (gzip: stdin: unexpected end of file)
  • apt: moq-gst tarball, same failure
  • docker: go getsum.golang.org ... stream error: INTERNAL_ERROR

None of those paths retried, so a single blip marked the client broken and failed its whole column.

Changes

  • fetch_tarball: curl --retry 5 --retry-all-errors (plain --retry does not cover partial transfers, which is exactly what the CDN produced) downloads to a file, then tar extracts. Shared by libmoq_fetch and the moq-gst fetch. Previously a truncated stream piped into tar xz left a half-extracted tree behind.
  • retry: small bounded-backoff helper; wraps the idempotent go get + go mod tidy (3 attempts) before the single go build.
  • The two GitHub release-list API queries also get --retry 3.

freshness.sh still passes (the go get "github.com/moq-dev/moq-go@latest" and grep '^libmoq-v' patterns it checks are unchanged); shellcheck/shfmt clean.

🤖 Generated with Claude Code

(written by Claude Opus 5)

Run 34857588399 failed three lanes on three unrelated network blips:
libmoq and moq-gst tarballs truncated mid-stream (gzip: unexpected end
of file) and `go get` hit a sum.golang.org INTERNAL_ERROR stream reset.
None of those paths retried, so one blip marked a client broken and
failed its whole column.

- fetch_tarball: curl --retry-all-errors (plain --retry skips partial
  transfers) to a file, then extract, shared by libmoq_fetch and the
  moq-gst fetch. Piping a truncated stream into `tar xz` left a
  half-extracted tree and an unhelpful error.
- retry: bounded backoff helper; wraps the idempotent `go get` +
  `go mod tidy` before the single go build.
- Release-list API queries retry as well.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T17:22:36.117989Z 71fa6aa PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 71fa6aa001

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread smoke.sh
Comment on lines +237 to 238
tag=$(curl -sf --retry 3 --retry-all-errors ${hdr[@]+"${hdr[@]}"} "https://api.github.com/repos/moq-dev/moq/releases?per_page=100" |
jq -r '.[].tag_name' | grep '^libmoq-v' | head -1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Write the retried release response to a file

When this API transfer fails after emitting a partial response, --retry-all-errors writes the next attempt into the same pipe, so jq receives the truncated JSON concatenated with the retried response and cannot extract a tag; the libmoq client is therefore still marked broken after a recoverable network blip. In the curl 8.5.0 CLI documentation inspected via curl --manual, --retry-all-errors explicitly warns that pipe output “is not reset” before retries and may contain duplicate data. Download this response with -o, as the moq-gst query already does, before parsing it.

Useful? React with 👍 / 👎.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 95f98aab-9e53-4af2-b976-7ed27aade829

📥 Commits

Reviewing files that changed from the base of the PR and between 05e7b5e and 71fa6aa.

📒 Files selected for processing (1)
  • smoke.sh

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The smoke script adds retry and tarball-fetch helpers. GitHub release API requests now retry. The libmoq_fetch and gst_prepare download paths use fetch_tarball. Go dependency fetching and module tidying retry up to three times before the build runs.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 71fa6

The retry changes preserve failure handling for smoke-test setup and do not show an unresolved merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the retry changes in smoke.sh and connects them to the transient download and module errors addressed by the pull request.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding retries for transient release and module downloads in smoke.sh.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/github-actions-workflow-fix-3c54fd

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kixelated
kixelated merged commit 4b6582c into main Sep 14, 2026
6 checks passed
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.

1 participant