-
Notifications
You must be signed in to change notification settings - Fork 10
fix: invalid deployment branch #485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe Earthfile was updated to reference the core Earthly image from the Changes
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate Unit Tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Dynamic Dependency Causes Build Instability
The core dependency was changed from a specific version tag (v0.19.1) to the main branch. This makes builds non-reproducible and unstable because main is a moving target, leading to different build outcomes over time.
Earthfile#L3-L4
Lines 3 to 4 in b04d8fa
| ARG core=github.com/formancehq/earthly:main |
Was this report helpful? Give feedback by reacting with 👍 or 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Earthfile(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: laouji
PR: formancehq/payments#107
File: Earthfile:58-60
Timestamp: 2024-12-16T10:39:42.421Z
Learning: In the `Earthfile`, within the `build-image` target, it's intentional for the build to fail if the `/plugins` directory is empty or does not exist. This ensures that the absence of plugins is detected during the build process.
Earthfile (1)
Learnt from: laouji
PR: formancehq/payments#107
File: Earthfile:58-60
Timestamp: 2024-12-16T10:39:42.421Z
Learning: In the `Earthfile`, within the `build-image` target, it's intentional for the build to fail if the `/plugins` directory is empty or does not exist. This ensures that the absence of plugins is detected during the build process.
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Tests
🔇 Additional comments (1)
Earthfile (1)
70-72: LGTM – trailing-newline change onlyLine 71 is a no-op formatting tweak; no additional action required.
| ARG core=github.com/formancehq/earthly:main | ||
| IMPORT $core AS core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
❓ Verification inconclusive
Pin the core image to an immutable reference for reproducible builds
Switching from a tagged version to the main branch fixes the immediate issue but introduces non-determinism: every build will pick up whatever is on main at build time, which can unexpectedly break downstream images.
Consider pinning to a commit SHA or a semver tag that you control (e.g. github.com/formancehq/earthly@sha256:<digest> or a vX.Y.Z tag) and bump it explicitly when you intend to upgrade.
-ARG core=github.com/formancehq/earthly:main
+# Example – pin to the commit used by current main
+# ARG core=github.com/formancehq/earthly@sha256:<digest>Pin the core image to an immutable reference
Using :main introduces non-determinism—every build will pull whatever is on main at that moment, which can unexpectedly break downstream images. Pinning to a commit SHA or semver tag ensures reproducible, controlled upgrades.
• Earthfile (lines 4–5)
- ARG core=github.com/formancehq/earthly:main
+ # Pin to a specific commit or tag for reproducible builds
+ ARG core=github.com/formancehq/earthly@sha256:<digest>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ARG core=github.com/formancehq/earthly:main | |
| IMPORT $core AS core | |
| # Pin to a specific commit or tag for reproducible builds | |
| ARG core=github.com/formancehq/earthly@sha256:<digest> | |
| IMPORT $core AS core |
🤖 Prompt for AI Agents
In Earthfile lines 4 to 5, the ARG core is currently set to use the :main tag,
which is mutable and causes non-deterministic builds. Replace the :main tag with
a specific immutable reference such as a commit SHA or a semver tag to ensure
reproducible builds and controlled upgrades.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #485 +/- ##
=======================================
Coverage 69.65% 69.65%
=======================================
Files 627 627
Lines 32208 32208
=======================================
Hits 22436 22436
Misses 8558 8558
Partials 1214 1214 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.