Skip to content
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

[goreleaser] disable cache build #2898

Merged
merged 5 commits into from
Jul 19, 2024
Merged

[goreleaser] disable cache build #2898

merged 5 commits into from
Jul 19, 2024

Conversation

trajan0x
Copy link
Contributor

@trajan0x trajan0x commented Jul 19, 2024

Description
A clear and concise description of the features you're adding in this pull request.

Additional context
Add any other context about the problem you're solving.

Metadata

  • Fixes #[Link to Issue]

Summary by CodeRabbit

  • New Features

    • Enhanced GitHub Actions workflow for faster execution and improved caching mechanisms.
    • Improved concurrency handling in the integration testing setup, allowing simultaneous operations for better efficiency.
  • Bug Fixes

    • Improved installation process in the Docker image to ensure necessary permissions for nodejs installation.

Copy link
Contributor

coderabbitai bot commented Jul 19, 2024

Walkthrough

This update enhances the CI/CD workflow by optimizing the execution environment and caching strategies in GitHub Actions. It improves concurrency in integration tests and modifies error handling in Go code, leading to more efficient and robust operations throughout the system.

Changes

Files Change Summary
.github/workflows/goreleaser-actions.yml Updated execution environment and caching mechanism, added a step for Go caching, and improved permissions settings.
docker/goreleaser/Dockerfile Modified Node.js installation command to include sudo, ensuring elevated privileges during installation.
services/rfq/e2e/setup_test.go Improved concurrency in the setupBE function using goroutines and sync.WaitGroup to manage task execution.

Poem

🐰 In the meadow where code does flow,
Changes made to help it grow.
Faster paths and caches bright,
Bugs and errors take to flight.
With each hop, our tests run free,
A joyful leap in harmony! 🌷✨


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.

@github-actions github-actions bot added M-ci Module: CI size/xs labels Jul 19, 2024
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

  • Disabled cache build in GoReleaser configuration
  • Updated .github/workflows/goreleaser-actions.yml to reflect cache changes
  • Modified Docker image caching strategy in workflow
  • Adjusted environment variable setup for Docker build steps
  • Ensured GoReleaser runs without caching in CI pipeline

No file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

cloudflare-workers-and-pages bot commented Jul 19, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0a06328
Status: ✅  Deploy successful!
Preview URL: https://4e40ed0c.sanguine-fe.pages.dev
Branch Preview URL: https://fix-cache.sanguine-fe.pages.dev

View logs

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

  • Disabled cache build in GoReleaser configuration
  • Updated .github/workflows/goreleaser-actions.yml to reflect cache changes
  • Modified Docker image caching strategy in workflow
  • Adjusted environment variable setup for Docker build steps
  • Ensured GoReleaser runs without caching in CI pipeline

No file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@github-actions github-actions bot added the go Pull requests that update Go code label Jul 19, 2024
Copy link

codecov bot commented Jul 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.37110%. Comparing base (788893f) to head (0a06328).
Report is 1 commits behind head on master.

Additional details and impacted files
@@                 Coverage Diff                 @@
##              master       #2898         +/-   ##
===================================================
- Coverage   25.68215%   25.37110%   -0.31106%     
===================================================
  Files            770         785         +15     
  Lines          55486       56521       +1035     
  Branches          80          80                 
===================================================
+ Hits           14250       14340         +90     
- Misses         39755       40699        +944     
- Partials        1481        1482          +1     
Flag Coverage Δ
ethergo 48.09957% <100.00000%> (+0.02676%) ⬆️
explorer 4.97877% <ø> (ø)
omnirpc 33.23904% <ø> (ø)
opbot 0.18564% <ø> (ø)
promexporter 8.50242% <ø> (?)
rfq 24.76385% <ø> (ø)
scribe 18.11159% <ø> (ø)
tools 30.55118% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

  • Updated error assertion method in ethergo/backends/anvil/anvil.go from require.Nil to require.NoError
  • Improved concurrency in services/rfq/e2e/setup_test.go using sync.WaitGroup to prevent race conditions

No major changes found since last review.

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

  • Updated error assertion method in ethergo/backends/anvil/anvil.go from require.Nil to require.NoError
  • Improved concurrency in services/rfq/e2e/setup_test.go using sync.WaitGroup to prevent race conditions

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

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: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c92fd80 and 22560ce.

Files selected for processing (3)
  • .github/workflows/goreleaser-actions.yml (4 hunks)
  • ethergo/backends/anvil/anvil.go (1 hunks)
  • services/rfq/e2e/setup_test.go (1 hunks)
Additional comments not posted (9)
.github/workflows/goreleaser-actions.yml (4)

114-114: Approved: Optimized execution environment.

The runs-on attribute has been updated to use namespace-profile-fast-goreleaser, which should enhance the performance of the workflow.


131-133: Approved: Enhanced caching mechanism.

A new volume mapping for /cache has been added, which should improve the caching strategy during the workflow execution.


134-134: Approved: Necessary permissions for mounting operations.

The options attribute has been added with --cap-add=SYS_ADMIN, which is required for the nscloud-cache-action to perform mounting operations.


154-159: Approved: Enhanced Go cache setup.

The new step Setup Go cache using namespacelabs/nscloud-cache-action@v1 conditionally enhances the caching strategy for Go dependencies.

ethergo/backends/anvil/anvil.go (1)

311-311: Approved: Improved error handling clarity.

The error handling has been updated from require.Nil(f.T(), err) to require.NoError(f.T(), err), which explicitly states that the absence of an error is expected.

services/rfq/e2e/setup_test.go (4)

150-151: Approved: Added sync.WaitGroup for concurrency management.

The sync.WaitGroup instance has been added to manage concurrent operations, which is necessary for synchronizing the completion of multiple goroutines.


153-153: Approved: Added goroutine for bulk deployment.

A goroutine has been added for bulk deployment through i.manager.BulkDeploy, allowing this operation to run concurrently with other tasks.


160-162: Approved: Added goroutines for token approvals.

Goroutines have been added for approving tokens for each user wallet, allowing multiple approval operations to occur simultaneously and improving efficiency.


168-168: Approved: Ensured completion of all goroutines.

The wg.Wait() call ensures that the main routine waits for all spawned goroutines to complete, addressing potential race conditions.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

  • Removed BulkDeploy function calls in services/rfq/e2e/setup_test.go
  • Simplified setup process by removing goroutines in services/rfq/e2e/setup_test.go
  • Potential race conditions due to removed goroutines in services/rfq/e2e/setup_test.go
  • Disabled cache build in .github/workflows/goreleaser-actions.yml

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

  • Disabled cache build in .github/workflows/goreleaser-actions.yml
  • Removed BulkDeploy function calls in services/rfq/e2e/setup_test.go
  • Simplified setup process by removing goroutines in services/rfq/e2e/setup_test.go
  • Potential race conditions due to removed goroutines in services/rfq/e2e/setup_test.go

No file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

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: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 22560ce and 0a06328.

Files selected for processing (3)
  • .github/workflows/goreleaser-actions.yml (4 hunks)
  • docker/goreleaser/Dockerfile (1 hunks)
  • services/rfq/e2e/setup_test.go (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/goreleaser-actions.yml
Files skipped from review as they are similar to previous changes (1)
  • services/rfq/e2e/setup_test.go
Additional comments not posted (1)
docker/goreleaser/Dockerfile (1)

116-116: Ensure the necessity of sudo in the Docker image.

The addition of sudo to the apt-get install command ensures that the sudo package is available within the Docker image. Verify that this change is necessary and does not introduce security vulnerabilities or unnecessary dependencies.

@trajan0x trajan0x merged commit 3ea8cb6 into master Jul 19, 2024
59 checks passed
@trajan0x trajan0x deleted the fix/cache branch July 19, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code M-ci Module: CI M-docker size/xs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant