NibiruChain / nibiru

Nibiru Chain: The breakthrough smart contract platform ushering in the next era of money. Nibiru powers an ecosystem of dApps including perps, RWAs, and more.
https://nibiru.fi
Apache License 2.0
183 stars 201 forks source link

fix(docker-chaosnet): release snapshot docker build failed CI #1847

Closed Unique-Divine closed 6 months ago

Unique-Divine commented 6 months ago

Purpose / Abstract

The GitHub action that builds using chaosnet.Dockerfile failed even though the pull request passed all of its checks.

This PR is meant to include necessary changes for the docker build.

Local Testing

Summary by CodeRabbit

coderabbitai[bot] commented 6 months ago

Walkthrough

This update enhances the workflow by broadening the trigger conditions for GitHub Actions, incorporating additional files like go.mod, go.sum, and specific Docker configurations. It also updates the Dockerfiles for better management of dependencies and project setup, ensuring a robust build and testing environment.

Changes

Files Change Summary
.github/workflows/...lint.yml Added **go.mod and **go.sum to paths for linting checks on push and pull_request events.
.github/workflows/...tests.yml Expanded paths to trigger integration and unit tests on pull requests to include **go.mod, **go.sum, and contrib/docker/ directory files.
Dockerfile, contrib/docker/...Dockerfile Updated Dockerfiles to handle project dependencies more effectively by adjusting how files like go.mod, go.sum, and geth are managed.
CHANGELOG.md Documented a fix related to the CI build process for the docker-chaosnet module.

Possibly related issues

Poem

🐇✨
In the land of code and docker files,
A rabbit hopped through digital aisles.
With a tweak here and a fix there,
Ensuring all workflows are beyond compare.
Celebrate each commit, merge, and pull,
In the garden of Git, life's never dull!
🌟🐰


Recent Review Details **Configuration used: CodeRabbit UI**
Commits Files that changed from the base of the PR and between 1a46a9b05d0185f1819d559f97ae78c4be75bbc6 and 919b2e5885da917f0fbb98552da69ac0aa02d38c.
Files selected for processing (6) * .github/workflows/golangci-lint.yml (1 hunks) * .github/workflows/integration-tests.yml (1 hunks) * .github/workflows/unit-tests.yml (1 hunks) * CHANGELOG.md (1 hunks) * Dockerfile (1 hunks) * contrib/docker/chaosnet.Dockerfile (1 hunks)
Additional comments not posted (9)
Dockerfile (2)
`5-6`: Ensure that the `go.mod` and `go.sum` files are up-to-date to avoid issues with dependencies during the Docker build process. --- `7-8`: Copying `geth` to `WORKDIR/geth` is a good practice for organizing executable files separately, which can simplify path management in scripts and applications.
contrib/docker/chaosnet.Dockerfile (2)
`5-6`: Copying `go.mod` and `go.sum` directly to the `WORKDIR` ensures that dependency management is handled correctly during the Docker build, which is crucial for consistent builds. --- `10-11`: Copying the rest of the project to the `WORKDIR` after setting up the environment ensures that all project files are available for subsequent build steps.
.github/workflows/integration-tests.yml (1)
`9-9`: Expanding the trigger paths to include `**go.mod` and `**go.sum` ensures that integration tests are run whenever there are changes to dependency files, which is crucial for catching issues early.
.github/workflows/unit-tests.yml (1)
`5-5`: Including `contrib/docker/*` in the paths that trigger unit tests ensures that changes to Docker configurations are also verified by unit tests, which is a good practice for maintaining robustness in Docker setups.
.github/workflows/golangci-lint.yml (1)
`7-7`: Adding `**go.mod` and `**go.sum` to the paths for both push and pull_request events ensures that linting checks are performed on these files when changes are made, which is essential for maintaining code quality. Also applies to: 9-9
CHANGELOG.md (2)
`66-66`: Consider whether this entry should be categorized under "State Machine Breaking". If the change does not affect the state machine but rather fixes a CI build issue, it might be more appropriate under "Bug Fixes" or "CI". --- `66-66`: The changelog entry is clear and follows the established format with a direct link to the pull request. Good job maintaining consistency.
--- 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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `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.` 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 a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.