Pin Renovate Earthly download#7387
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe flake now exposes an ChangesEarthly via Nix profile installation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Thank you for the change — would you like me to check for any CI config that ensures Nix flakes and 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/renovate-entrypoint.sh:
- Around line 10-12: Download is written directly to /usr/local/bin/earthly
without retries or atomic replace; change the flow to: use mktemp to create a
temporary file, use curl with retry and timeout flags (--retry, --retry-delay,
--retry-all-errors, --connect-timeout, --max-time) to download into that temp
file, run the existing sha256sum validation against EARTHLY_LINUX_AMD64_SHA256
on the temp file, and only on success use install (or mv with appropriate
permissions) to atomically move the validated temp file to
/usr/local/bin/earthly (and set executable bit). Update the script around the
EARTHLY_VERSION download block and the curl invocation to reference the temp
file and include retries/timeouts.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: dfa06bc6-7731-48b8-9a09-e991d6d3e413
📒 Files selected for processing (1)
.github/renovate-entrypoint.sh
jbw976
left a comment
There was a problem hiding this comment.
thanks for this @phisco - happy to take any PRs like this that pin to specific versions. just a few questions, but approving now too.
do we remove this eventually when we no longer have a supported release branch that uses earthly? (v2.2 is oldest release using Nix, all older ones use Earthly)
is this something we can make renovate update over time too? or not so important because earthly won't be getting any updates...🤔
78b1bb4 to
242e617
Compare
Signed-off-by: Philippe Scorsolini <5697904+phisco@users.noreply.github.com>
242e617 to
6d7a428
Compare
|
@jbw976 reworked, turns out the best way to pin it is to use nix itself. so the change got smaller 🎉 as always with these things, we need to see it run before actually being sure it's running, so I'll keep an eye on ci once it gets merged |
Description of your changes
This PR makes the Earthly binary used by self-hosted Renovate come from the repository's pinned Nix flake instead of downloading it from GitHub releases at workflow runtime.
The Renovate workflow runs a custom entrypoint that installs Earthly before running Renovate. Previously that entrypoint downloaded Earthly from the mutable
latestrelease URL. This PR exposespkgs.earthlyas a flake package and installs it withnix profile install .#earthly, so the Earthly package is selected from thenixpkgsrevision pinned inflake.lock.earthlydoes not appear by name inflake.lock;flake.lockpins thenixpkgsinput, and.#earthlyresolvespkgs.earthlyfrom that pinned input. Future Earthly updates will therefore happen through the normal Renovate-managed flake lock update path.Validation run:
Fixes #
I have:
Run./nix.sh flake checkto ensure this PR is ready for review.Added or updated unit tests.Added or updated e2e tests.Linked a PR or a docs tracking issue to document this change.Addedbackport release-x.ylabels to auto-backport this PR.Followed the API promotion workflow if this PR introduces, removes, or promotes an API.