Skip to content

Conversation

@gfyrag
Copy link
Contributor

@gfyrag gfyrag commented Jul 4, 2025

No description provided.

@gfyrag gfyrag requested a review from a team as a code owner July 4, 2025 13:13
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 4, 2025

Walkthrough

The Earthfile was updated to reference the core Earthly image from the main branch instead of a specific version tag. Additionally, a trailing newline was added at the end of the file, with no impact on functionality or exported entities.

Changes

File Change Summary
Earthfile Updated core Earthly image reference to main branch; added trailing newline.

Suggested reviewers

  • paul-nicolas
  • laouji

Poem

A hop to the main, no more tags in sight,
Earthly builds ready for flight!
A newline at end, a tidy delight,
Rabbits approve, all feels right.
🐇✨

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in a Comment
  • Commit Unit Tests in branch fix/devenv-invalid-branch

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@cursor cursor bot left a 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

payments/Earthfile

Lines 3 to 4 in b04d8fa

ARG core=github.com/formancehq/earthly:main

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

Copy link
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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3a2b587 and b04d8fa.

📒 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 only

Line 71 is a no-op formatting tweak; no additional action required.

Comment on lines +4 to 5
ARG core=github.com/formancehq/earthly:main
IMPORT $core AS core
Copy link
Contributor

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.

Suggested change
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
Copy link

codecov bot commented Jul 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.65%. Comparing base (3a2b587) to head (b04d8fa).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gfyrag gfyrag added this pull request to the merge queue Jul 4, 2025
Merged via the queue into main with commit 75786d9 Jul 4, 2025
13 of 14 checks passed
@gfyrag gfyrag deleted the fix/devenv-invalid-branch branch July 4, 2025 13:35
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.

4 participants