8000 fix(earthfile): fix missing list files when releasing by paul-nicolas · Pull Request #275 · formancehq/payments · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(earthfile): fix missing list files when releasing #275

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

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

paul-nicolas
Copy link
Contributor

No description provided.

@paul-nicolas paul-nicolas requested a review from a team as a code owner January 22, 2025 14:18
Copy link
Contributor
coderabbitai bot commented Jan 22, 2025

Walkthrough

The pull request introduces modifications to the Earthfile, focusing on enhancing the build process by systematically copying the list.go file across different stages. The changes ensure that the list.go file is consistently available during compilation, testing, and release stages. By adding specific COPY commands, the modifications improve the accessibility of the plugin list file throughout the build workflow, supporting more robust and integrated plugin management.

Changes

File Change Summary
Earthfile - Added COPY (+compile-plugins/list.go) to compile stage
- Added COPY (+compile-plugins/list.go) to release stage
- Added COPY (+compile-plugins/list.go) to tests stage when includeIntegrationTests is true

Possibly related PRs

  • chore: add code coverage #244: Modifies tests section of Earthfile, adding includeIntegrationTests argument similar to the current PR's testing enhancements

Suggested reviewers

  • laouji

Poem

🐰 Hopping through the Earthfile's maze,
Copying files in magical ways,
list.go travels from stage to stage,
A plugin's journey on our code's page,
Build, test, release - a rabbit's delight! 🚀


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between be87eb0 and ff52d35.

📒 Files selected for processing (1)
  • Earthfile (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: GoReleaser
  • GitHub Check: Tests
🔇 Additional comments (2)
Earthfile (2)

171-171: LGTM! Important fix for plugin registration.

This change ensures that the plugin list file is available during release, which is crucial for including all plugins in the final binary. The fix maintains consistency with other build stages.


171-171: Verify plugin registration in the released binary.

To ensure the fix works as intended, please verify that all plugins are properly registered in the released binary.

Run this script to verify the fix:

✅ Verification successful

All plugins are properly registered in the binary

The verification confirms that all plugins (adyen, atlar, bankingcircle, currencycloud, dummypay, generic, mangopay, modulr, moneycorp, stripe, wise) are correctly imported in list.go using blank imports, ensuring proper plugin registration at runtime.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that plugins are properly included in the release artifacts

# Step 1: List all plugin directories to know what should be included
echo "Expected plugins:"
fd --max-depth=1 --type=directory . internal/connectors/plugins/public/

# Step 2: Check if these plugins are imported in list.go
echo -e "\nPlugin imports in list.go:"
rg "import|github.com/formancehq/payments/internal/connectors/plugins/public" internal/connectors/plugins/public/list.go

# Step 3: Check goreleaser config to ensure no plugins are excluded
echo -e "\nGoreleaser configuration:"
rg -A 5 "build:|import:" .goreleaser.yml

Length of output: 1829


Script:

#!/bin/bash
# Find and check goreleaser config
echo "Looking for goreleaser config files:"
fd -e yml -e yaml . | grep -i release

echo -e "\nChecking build configurations in found files:"
for f in $(fd -e yml -e yaml . | grep -i release); do
  echo "=== $f ==="
  cat "$f" | grep -A 10 "^builds:"
done

Length of output: 271


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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
codecov bot commented Jan 22 8000 , 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.61%. Comparing base (be87eb0) to head (ff52d35).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
- Coverage   71.62%   71.61%   -0.02%     
==========================================
  Files         540      539       -1     
  Lines       27532    27527       -5     
==========================================
- Hits        19721    19713       -8     
- Misses       6750     6751       +1     
- Partials     1061     1063       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@paul-nicolas paul-nicolas merged commit 7839668 into main Jan 22, 2025
9 of 14 checks passed
@paul-nicolas paul-nicolas deleted the fix/payment-release branch January 22, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0