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

ci: use ghcr docker images to avoid rate limiting #2600

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

gartnera
Copy link
Member

@gartnera gartnera commented Jul 30, 2024

Occasionally CI will fail to pull an image because of docker hub rate limiting (we get 200 pulls per 6 hours).

https://github.com/zeta-chain/copy-docker-images copies relevant images into ghcr.io. Use those images in our CI Dockerfile and docker-compose files.

This must be done on github actions as only the CI token may push to ghcr.io

Summary by CodeRabbit

  • New Features

    • Updated the base images for various Dockerfiles to utilize GitHub Container Registry, enhancing the sourcing of critical services.
    • Improved clarity in the docker-compose.yml with new image references for Ethereum and Bitcoin services.
  • Documentation

    • Added guidance within the docker-compose.yml for using third-party images in CI.

These changes improve the reliability and infrastructure of the application.

@gartnera gartnera added the no-changelog Skip changelog CI check label Jul 30, 2024
Copy link
Contributor

coderabbitai bot commented Jul 30, 2024

Walkthrough

Walkthrough

The recent updates involve a transition from Docker Hub to GitHub Container Registry (ghcr.io) for several Docker images across multiple components, including the Dockerfile for localnet and the orchestrator. This shift aims to leverage potentially optimized images hosted in the zeta-chain repository, while maintaining the same functionality. The changes enhance clarity in image sourcing and ensure compatibility with the overall infrastructure.

Changes

Files Change Summary
Dockerfile-localnet, docker-compose.yml, orchestrator/Dockerfile.fastbuild Updated base images from Docker Hub to GitHub Container Registry (ghcr.io) for Go and Ethereum client images.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant CI/CD
    participant ghcr.io
    participant Docker
    participant Application

    Developer->>CI/CD: Push changes
    CI/CD->>ghcr.io: Pull updated images
    ghcr.io-->>CI/CD: Provide images
    CI/CD->>Docker: Build application
    Docker-->>Application: Deploy updated application
Loading

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.

@gartnera gartnera requested a review from a team July 30, 2024 22:23
@gartnera gartnera force-pushed the ghcr-docker-images branch from 7daa83b to 6e14a23 Compare July 30, 2024 22:24
@gartnera gartnera marked this pull request as ready for review July 30, 2024 22:26
@gartnera gartnera enabled auto-merge July 30, 2024 22:27
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 6e9dc53 and 6e14a23.

Files selected for processing (3)
  • Dockerfile-localnet (2 hunks)
  • contrib/localnet/docker-compose.yml (3 hunks)
  • contrib/localnet/orchestrator/Dockerfile.fastbuild (1 hunks)
Additional comments not posted (8)
contrib/localnet/orchestrator/Dockerfile.fastbuild (2)

2-2: Approved: Update base image to GitHub Container Registry.

The base image for the Ethereum client has been updated to ghcr.io/zeta-chain/ethereum-client-go:v1.10.26. Ensure that the new image is available and correctly referenced.


3-3: Approved: Update base image to GitHub Container Registry.

The base image for the Go language has been updated to ghcr.io/zeta-chain/golang:1.22.5-bookworm. Ensure that the new image is available and correctly referenced.

Dockerfile-localnet (3)

2-2: Approved: Update base image to GitHub Container Registry.

The base image for the base-build stage has been updated to ghcr.io/zeta-chain/golang:1.22.5-bookworm. Ensure that the new image is available and correctly referenced.


25-25: Approved: Update base image to GitHub Container Registry.

The base image for the cosmovisor-build stage has been updated to ghcr.io/zeta-chain/golang:1.22.5-bookworm. Ensure that the new image is available and correctly referenced.


28-28: Approved: Update base image to GitHub Container Registry.

The base image for the base-runtime stage has been updated to ghcr.io/zeta-chain/golang:1.22.5-bookworm. Ensure that the new image is available and correctly referenced.

contrib/localnet/docker-compose.yml (3)

13-13: Approved: Add guidance comment for third-party images in CI.

The comment provides valuable guidance on using third-party images in CI and suggests copying them into GitHub Container Registry.


186-186: Approved: Update image reference to GitHub Container Registry.

The image reference for the eth service has been updated to ghcr.io/zeta-chain/ethereum-client-go:v1.10.26. Ensure that the new image is available and correctly referenced.


212-212: Approved: Update image reference to GitHub Container Registry.

The image reference for the bitcoin service has been updated to ghcr.io/zeta-chain/ruimarinho-bitcoin-core:22. Ensure that the new image is available and correctly referenced.

@gartnera gartnera added this pull request to the merge queue Jul 30, 2024
Merged via the queue into develop with commit 3b18610 Jul 30, 2024
30 checks passed
@gartnera gartnera deleted the ghcr-docker-images branch July 30, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Skip changelog CI check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants