Conversation
WalkthroughIntroduces transaction-plane component integration by adding an ignore entry in .earthlyignore and configuring a version variable and OpenAPI spec download step in Earthfile for the transaction-plane component. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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
🧹 Nitpick comments (1)
Earthfile (1)
38-47: Consider adding--failflag to detect download failures.All
curlcommands in this section (including the new one) lack the--fail(-f) flag. Without it,curlreturns exit code 0 even on HTTP 404 errors, which would cause the build to silently continue with an error page saved as the YAML file instead of failing fast.🔧 Example fix for all curl commands
- RUN curl -L https://github.com/formancehq/ledger/releases/download/${LEDGER_VERSION}/openapi.yaml -o ledger.openapi.yaml + RUN curl -fL https://github.com/formancehq/ledger/releases/download/${LEDGER_VERSION}/openapi.yaml -o ledger.openapi.yamlApply similarly to all other
curlcommands.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Earthfile` around lines 38 - 47, The curl invocations that download OpenAPI files (the RUN curl ... lines that reference LEDGER_VERSION, PAYMENTS_VERSION, GATEWAY_VERSION, AUTH_VERSION, SEARCH_VERSION, WEBHOOKS_VERSION, WALLETS_VERSION, RECONCILIATION_VERSION, ORCHESTRATION_VERSION, TRANSACTION_PLANE_VERSION and write to *.openapi.yaml) should include the --fail (or -f) flag so HTTP errors cause a non‑zero exit and fail the build; update each RUN curl command to add --fail (optionally with --show-error or -S) while keeping -L and the -o output argument.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Earthfile`:
- Line 15: The Earthfile uses ARG TRANSACTION_PLANE_VERSION=v0.2.0 which points
to a non-existent GitHub release and causes the openapi.yaml download to fail;
update the TRANSACTION_PLANE_VERSION value to a valid existing release tag or
change the download URL to the correct repository/release, or remove/guard the
download step that fetches
https://github.com/formancehq/transaction-plane/releases/download/${TRANSACTION_PLANE_VERSION}/openapi.yaml;
verify the target repository and release exist before committing and ensure the
updated TRANSACTION_PLANE_VERSION is referenced consistently wherever used.
---
Nitpick comments:
In `@Earthfile`:
- Around line 38-47: The curl invocations that download OpenAPI files (the RUN
curl ... lines that reference LEDGER_VERSION, PAYMENTS_VERSION, GATEWAY_VERSION,
AUTH_VERSION, SEARCH_VERSION, WEBHOOKS_VERSION, WALLETS_VERSION,
RECONCILIATION_VERSION, ORCHESTRATION_VERSION, TRANSACTION_PLANE_VERSION and
write to *.openapi.yaml) should include the --fail (or -f) flag so HTTP errors
cause a non‑zero exit and fail the build; update each RUN curl command to add
--fail (optionally with --show-error or -S) while keeping -L and the -o output
argument.
ℹ️ Review info
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (3)
.github/labeler.ymlis excluded by!**/*.ymlreleases/base.yamlis excluded by!**/*.yamlreleases/openapi-merge.jsonis excluded by!**/*.json
📒 Files selected for processing (2)
.earthlyignoreEarthfile
| ARG ORCHESTRATION_VERSION=v2.4.0 | ||
| ARG RECONCILIATION_VERSION=v2.2.1 | ||
| ARG GATEWAY_VERSION=v2.1.0 | ||
| ARG TRANSACTION_PLANE_VERSION=v0.2.0 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify that the transaction-plane v0.2.0 release exists
# Check the HTTP status of the release download URL
# Try to get the release information via GitHub API
curl -s "https://api.github.com/repos/formancehq/transaction-plane/releases/tags/v0.2.0" | head -n 50Repository: formancehq/stack
Length of output: 206
🏁 Script executed:
#!/bin/bash
# List available releases for transaction-plane
curl -s "https://api.github.com/repos/formancehq/transaction-plane/releases" | jq '.[] | {tag_name, published_at}' | head -50Repository: formancehq/stack
Length of output: 128
🏁 Script executed:
#!/bin/bash
# Check the raw API response for releases
curl -s "https://api.github.com/repos/formancehq/transaction-plane/releases" | head -100Repository: formancehq/stack
Length of output: 194
🏁 Script executed:
#!/bin/bash
# Check if the repository exists at all
curl -s "https://api.github.com/repos/formancehq/transaction-plane" | head -50Repository: formancehq/stack
Length of output: 191
🏁 Script executed:
#!/bin/bash
# Search for transaction-plane in formancehq organization
curl -s "https://api.github.com/search/repositories?q=transaction-plane+org:formancehq" | jq '.items[].full_name'Repository: formancehq/stack
Length of output: 42
🏁 Script executed:
#!/bin/bash
# Check the Earthfile context - look for other references to understand the pattern
git ls-files | grep -i earthfile | head -5Repository: formancehq/stack
Length of output: 86
🏁 Script executed:
#!/bin/bash
# Read the main Earthfile to understand the context
cat -n Earthfile | head -30Repository: formancehq/stack
Length of output: 968
🏁 Script executed:
#!/bin/bash
# Search for how TRANSACTION_PLANE_VERSION is used in the codebase
rg "TRANSACTION_PLANE_VERSION" -A 2 -B 2Repository: formancehq/stack
Length of output: 742
🏁 Script executed:
#!/bin/bash
# Search for any other references to transaction-plane in the codebase
rg "transaction-plane" -iRepository: formancehq/stack
Length of output: 422
The transaction-plane repository does not exist on GitHub. The Earthfile references a non-existent release at line 15. The build will fail when attempting to download openapi.yaml from https://github.com/formancehq/transaction-plane/releases/download/v0.2.0/openapi.yaml. Verify that the repository has been created and the v0.2.0 release exists before merging.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Earthfile` at line 15, The Earthfile uses ARG
TRANSACTION_PLANE_VERSION=v0.2.0 which points to a non-existent GitHub release
and causes the openapi.yaml download to fail; update the
TRANSACTION_PLANE_VERSION value to a valid existing release tag or change the
download URL to the correct repository/release, or remove/guard the download
step that fetches
https://github.com/formancehq/transaction-plane/releases/download/${TRANSACTION_PLANE_VERSION}/openapi.yaml;
verify the target repository and release exist before committing and ensure the
updated TRANSACTION_PLANE_VERSION is referenced consistently wherever used.
No description provided.