Skip to content

Improve curl commands#506

Merged
rob93c merged 4 commits into
mainfrom
configure-curl-retries
May 31, 2026
Merged

Improve curl commands#506
rob93c merged 4 commits into
mainfrom
configure-curl-retries

Conversation

@rob93c
Copy link
Copy Markdown
Member

@rob93c rob93c commented May 30, 2026

Summary by CodeRabbit

  • Chores
    • Improved FFmpeg and FFprobe setup on macOS and Windows with a more consistent download flow and retry handling.
    • Added clearer download reporting so installation logs show the final source URL.
    • Streamlined archive handling by unpacking files automatically and removing temporary downloads after use.

@rob93c rob93c requested a review from MartelliEnrico May 30, 2026 18:43
@rob93c rob93c self-assigned this May 30, 2026
@rob93c rob93c added enhancement New feature or request cicd The change affects CI/CD flows labels May 30, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 30, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: acf18dc7-de9a-451b-b859-1683d307425d

📥 Commits

Reviewing files that changed from the base of the PR and between 4ed249e and 39e0655.

📒 Files selected for processing (1)
  • .github/actions/setup-ffmpeg/action.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/actions/setup-ffmpeg/action.yml

📝 Walkthrough

Walkthrough

Adds a shared download_binary() bash helper (curl with retries and effective-URL logging), replaces inline macOS/Windows curl+unzip steps with calls to that helper, then moves and (on macOS) chmods the extracted ffmpeg/ffprobe into $INSTALL_DIR.

Changes

FFmpeg Download Resilience

Layer / File(s) Summary
curl-based download helper and installer usage
.github/actions/setup-ffmpeg/action.yml
Adds download_binary() that uses curl -sS -f -L --retry 3 --retry-delay 5 -w to fetch archives, unzips and removes the zip; macOS and Windows flows now call it and then move extracted ffmpeg/ffprobe (and apply chmod +x on macOS) into $INSTALL_DIR.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Stickerifier/Stickerify#448: Both PRs modify .github/actions/setup-ffmpeg/action.yml to change how FFmpeg/FFprobe are downloaded and installed on macOS/Windows.

Poem

🐰 I hopped to fetch the quiet zip,
Retries and curls to mend the trip.
URLs told, the archive freed,
Binaries moved—ready at speed.
🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Improve curl commands' is partially related to the changeset but lacks specificity about the main change - a new download_binary() helper function. Consider a more descriptive title like 'Add download_binary() helper for FFmpeg downloads' to better reflect the primary refactoring objective.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/actions/setup-ffmpeg/action.yml:
- Around line 31-33: Add archive integrity verification before extracting
downloaded FFmpeg zips: after each curl that writes ffmpeg.zip (the command
using "https://www.osxexperts.net/ffmpeg${FF_VERSION}arm.zip" and the other
similar curl invocations referenced), also download the corresponding SHA-256
checksum or signature from a trusted source, compute the local checksum (e.g.,
using shasum -a 256 or sha256sum) for the saved ffmpeg.zip, compare it to the
trusted checksum and fail the action if they differ, and only proceed to
unzip/extract when the verification succeeds; apply the same checksum
download+verify flow to the other curl blocks mentioned (lines 36-38 and 45-47)
so every downloaded archive is verified before extraction.
- Around line 31-33: The curl downloads for FFmpeg currently don't treat HTTP
4xx/5xx as errors, so add the --fail flag to the curl invocations that fetch
"https://www.osxexperts.net/ffmpeg${FF_VERSION}arm.zip" (and the other two
FFmpeg download curl commands referenced nearby) so HTTP errors trigger the
configured --retry/--retry-delay and fail fast before unzip; keep the existing
flags (-sS -L --retry 3 --retry-delay 5) and simply insert --fail into those
curl command arguments.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2fed14c3-8d0b-4a3a-8dc4-6c1158244401

📥 Commits

Reviewing files that changed from the base of the PR and between 8ca771a and e73dfad.

📒 Files selected for processing (1)
  • .github/actions/setup-ffmpeg/action.yml

Comment thread .github/actions/setup-ffmpeg/action.yml Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 30, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 30, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 31, 2026
@rob93c rob93c merged commit c9ed3d7 into main May 31, 2026
8 checks passed
@rob93c rob93c deleted the configure-curl-retries branch May 31, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cicd The change affects CI/CD flows enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants