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: attempt to fix docker builds by building arm64 and amd64 separately #6588

Merged

Conversation

PastaPastaPasta
Copy link
Member

Issue being fixed or feature implemented

this is a follow-up to #6586; because that fix did not appear to work https://github.com/dashpay/dash/actions/runs/13376032021/job/37424076219

What was done?

Stop using qemu, and build on arm runners

How Has This Been Tested?

Hasn't; to be tested once merged

Breaking Changes

Can't break which is broken

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@PastaPastaPasta PastaPastaPasta added this to the 23 milestone Feb 18, 2025
Copy link

coderabbitai bot commented Feb 18, 2025

Walkthrough

The changes restructure the Docker Hub release workflow by splitting the original release job into two separate jobs targeting distinct architectures. One job, designated for the amd64 architecture (release-amd64), now incorporates a dedicated build and push step with an updated identifier (docker_build_amd64) for handling amd64 images. The arm64 counterpart (release-arm64) has been introduced to manage builds specifically for the arm64 architecture, using a similar process with its own dedicated step identifier (docker_build_arm64). The configuration now specifies the exact platforms for each job by setting linux/amd64 for the amd64 job and linux/arm64 for the arm64 job. Additionally, the step output for image digest has been updated to reference the new identifiers for each respective architecture, and the previous QEMU setup has been removed.


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

@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: 1

🧹 Nitpick comments (3)
.github/workflows/release_docker_hub.yml (3)

58-74: Docker Build-Push Action Version (amd64)
The "Build and push (amd64)" step uses docker/build-push-action@v3. Static analysis hints suggest that this version may be outdated. Consider verifying if a newer version (for example, v4) is available to take advantage of improvements and stability.

-      uses: docker/build-push-action@v3
+      uses: docker/build-push-action@v4
🧰 Tools
🪛 actionlint (1.7.4)

60-60: the runner of "docker/build-push-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


83-93: Action Versions for ARM64 Job Steps
In the ARM64 job, the Checkout, Setup Buildx, and Login steps use actions/checkout@v3, docker/setup-buildx-action@v2, and docker/login-action@v2 respectively. Static analysis recommends verifying these action versions for potential updates. Updating them (if newer versions are available) can improve performance, security, and compatibility.

🧰 Tools
🪛 actionlint (1.7.4)

84-84: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


87-87: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


90-90: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


95-111: Docker Build-Push Action Version (arm64)
Similar to the amd64 job, the ARM64 build step employs docker/build-push-action@v3. It is advisable to check for a newer version (e.g., v4) that may offer enhanced features and bug fixes.

-      uses: docker/build-push-action@v3
+      uses: docker/build-push-action@v4
🧰 Tools
🪛 actionlint (1.7.4)

97-97: the runner of "docker/build-push-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


104-104: property "docker_meta" is not defined in object type {}

(expression)


105-105: property "docker_meta" is not defined in object type {}

(expression)


106-106: property "get_tag" is not defined in object type {}

(expression)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between b6ea178 and 757b95b.

📒 Files selected for processing (1)
  • .github/workflows/release_docker_hub.yml (3 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/release_docker_hub.yml

60-60: the runner of "docker/build-push-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


81-81: label "ubuntu-22.04-arm" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


84-84: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


87-87: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


90-90: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: x86_64-w64-mingw32 / Build depends
  • GitHub Check: x86_64-pc-linux-gnu_nowallet / Build depends
  • GitHub Check: arm-linux-gnueabihf / Build depends
  • GitHub Check: x86_64-pc-linux-gnu_multiprocess / Build depends
  • GitHub Check: x86_64-pc-linux-gnu / Build depends
🔇 Additional comments (3)
.github/workflows/release_docker_hub.yml (3)

8-9: Job Definition for release-amd64
The new release-amd64 job is clearly defined and properly named. The structure aligns with releasing only the amd64 image.


76-77: Image Digest Step (amd64)
This step correctly echoes the image digest from the build output. No issues identified here.


113-114: Image Digest Step (arm64)
This step echoes the image digest from the ARM64 build output correctly. No changes are needed here.

Comment on lines +79 to +81
release-arm64:
name: Release to Docker Hub (arm64)
runs-on: ubuntu-22.04-arm
Copy link

@coderabbitai coderabbitai bot Feb 18, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue

Runner Label for release-arm64
The runs-on clause is set to ubuntu-22.04-arm, but this label is not recognized among the available runner labels. Consider replacing it with a valid label like arm64 (or another appropriate valid label) to ensure the job runs on the intended ARM runner.

-    runs-on: ubuntu-22.04-arm
+    runs-on: arm64
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
release-arm64:
name: Release to Docker Hub (arm64)
runs-on: ubuntu-22.04-arm
release-arm64:
name: Release to Docker Hub (arm64)
runs-on: arm64
🧰 Tools
🪛 actionlint (1.7.4)

81-81: label "ubuntu-22.04-arm" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

🧩 Analysis chain

@PastaPastaPasta Thank you for the correction. You're absolutely right - the ubuntu-22.04-arm runner is indeed available as part of GitHub's new ARM64 runners release.


🌐 Web query:

What are the available GitHub Actions runner labels for ARM64 runners in 2025?

💡 Result:

GitHub Actions introduced expanded support for ARM64 runners in 2025 with distinct labeling options:

Standard GitHub-hosted ARM64 labels (public repos)

  • ubuntu-latest-arm64
    Primary label for Linux-based ARM64 runners using Ubuntu 22.04[10][6]
  • linux-arm64
    Generic identifier combining OS and architecture[7][10]

Self-hosted runner labels

For custom setups:

  • Default labels:
    self-hosted, linux, ARM64 (combined as [self-hosted, linux, ARM64])[4][7]
  • Custom labels:
    Organizations can add tags like gpu or iot alongside architecture/OS identifiers[4][7]

Availability notes

  • Free usage applies only to public repositories[10][5]
  • Private repositories require paid plans (Team/Enterprise) or self-hosted solutions[2][6]
  • Windows ARM64 support remains limited to self-hosted setups[2][7]

The ARM64 rollout followed a phased timeline:

  1. Paid access for Team/Enterprise (June 2024)[2]
  2. Public repo availability (January 2025)[10]
  3. Private repo support planned for H2 2025[1][6]

For workflows targeting ARM64 in public repos:

runs-on: ubuntu-latest-arm64

Citations:


@PastaPastaPasta I apologize for my previous response. After double-checking the documentation, it appears that the correct runner labels for ARM64 are either ubuntu-latest-arm64 or linux-arm64. The label ubuntu-22.04-arm might not work as expected. Would you like to update the workflow to use one of these officially supported labels?

runs-on: ubuntu-latest-arm64  # or linux-arm64

✏️ Learnings added
Learnt from: PastaPastaPasta
PR: dashpay/dash#6588
File: .github/workflows/release_docker_hub.yml:79-81
Timestamp: 2025-02-19T00:03:38.795Z
Learning: GitHub Actions supports ARM64 runners with the label `ubuntu-22.04-arm` for public repositories, introduced in January 2025. This runner is specifically designed for ARM64 architecture builds.

Learnt from: PastaPastaPasta
PR: dashpay/dash#6588
File: .github/workflows/release_docker_hub.yml:79-81
Timestamp: 2025-02-19T00:03:38.795Z
Learning: GitHub Actions supports ARM64 runners with the labels `ubuntu-latest-arm64` and `linux-arm64` for public repositories, introduced in January 2025. These runners are specifically designed for ARM64 architecture builds.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!

@PastaPastaPasta
Copy link
Member Author

Going to merge; can always revert as needed.

@PastaPastaPasta PastaPastaPasta merged commit db0df3c into dashpay:develop Feb 19, 2025
19 of 20 checks passed
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Feb 19, 2025
…ing arm64 and amd64 separately"

This reverts commit db0df3c, reversing
changes made to b6ea178.
PastaPastaPasta added a commit that referenced this pull request Feb 19, 2025
… building arm64 and amd64 separately"

e227897 Revert "Merge #6588: ci: attempt to fix docker builds by building arm64 and amd64 separately" (pasta)

Pull request description:

  ## What was done?
  This reverts commit db0df3c, reversing changes made to b6ea178.

  ## How Has This Been Tested?
  The changes in develop before this commit were sufficient for fixing the release

  diff is empty between: https://github.com/dashpay/dash/compare/b6ea17831e4a5f2c9378eb048a801a48eaed574d..e2278979dfec80d662f36ccc737fe2c7d4261ff9

  ## Breaking Changes
  None

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: 26bb2cd55a0267b56f86938d97ddfa32f0cdd8a2786c0366eedbcddf706e38b6af93cd29ab98ba420cbdbd112561ded61e2dba906c4b233ad737f24730f58ddc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant