Skip to content

Conversation

@LesnyRumcajs
Copy link
Member

@LesnyRumcajs LesnyRumcajs commented Jul 10, 2025

Summary of changes

Changes introduced in this pull request:

  • fixes the multiarch image retagging that caused squashing the image onto a single arch one.
root@hubert-docker-tag-tests:~# docker run -it --entrypoint /bin/bash ghcr.io/chainsafe/forest:latest-fat
WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested
exec /bin/bash: exec format error
  • I already re-tagged the v0.27.0 to latest and their -fat counterparts.

dry run: https://github.com/ChainSafe/forest/actions/runs/16194742981
push run which fixes the multiarch latest and latest-fat`: https://github.com/ChainSafe/forest/actions/runs/16194760787/job/45718457911

Before:

❯ docker buildx imagetools inspect --raw ghcr.io/chainsafe/forest:latest | jq
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
  "config": {
    "mediaType": "application/vnd.docker.container.image.v1+json",
    "size": 3660,
    "digest": "sha256:4ed972f1223ca4d96020a5b537b628e1af99225823f814a725702d0fdc95c809"
  },
  "layers": [
    {
      "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
      "size": 28851899,
      "digest": "sha256:69c262fc30fc134b6d373dee8db695319c41d8b9489deb0f682565473bf29748"
    },
    {
      "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
      "size": 1032260,
      "digest": "sha256:6074b859214e4595f7b97dfe1280383bb23472a4ae0eab0f2010924a11e103fb"
    },
    {
      "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
      "size": 126563,
      "digest": "sha256:141a85c7729f175d9f4b877112b8080c38ea36f883dbd2663a79f0817d0c5fd0"
    },
    {
      "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
      "size": 63711623,
      "digest": "sha256:754208c6bbb4c817e959766bc48f41cc089c51e67986e3fa4d91ec56bb3e7aa8"
    },
    {
      "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
      "size": 32,
      "digest": "sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1"
    }
  ]
}

after

❯ docker buildx imagetools inspect --raw ghcr.io/chainsafe/forest:latest | jq
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.index.v1+json",
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:613f2541ad85712819b1562bb0fd038c9091b5337f5cd5cbe3d36d2f250f02be",
      "size": 1245,
      "platform": {
        "architecture": "amd64",
        "os": "linux"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:e43156aa9147a49a7d9fd743a11aea84fad39bd6a2c9bacc099322d89b25e0b4",
      "size": 1245,
      "platform": {
        "architecture": "arm64",
        "os": "linux"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:b4bb1edf71561619f192390ebd358b6ed964b1c6897815aad4c605560049e23a",
      "size": 567,
      "annotations": {
        "vnd.docker.reference.digest": "sha256:613f2541ad85712819b1562bb0fd038c9091b5337f5cd5cbe3d36d2f250f02be",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:f2dd45ffa30991435ea91b8cb54045be38c9abee0ed65220a7f58b8156f9f74f",
      "size": 567,
      "annotations": {
        "vnd.docker.reference.digest": "sha256:e43156aa9147a49a7d9fd743a11aea84fad39bd6a2c9bacc099322d89b25e0b4",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      }
    }
  ]
}

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Summary by CodeRabbit

  • Chores
    • Improved workflow for image tagging and pushing, now supporting both actual and dry-run operations.
    • Tagging and pushing are now handled in a single step, with dry-run simulations available based on configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 10, 2025

Walkthrough

The GitHub Actions workflow for Docker image tagging was updated to use docker buildx imagetools create for both real and dry-run operations, replacing previous pull/tag/push steps. The workflow now conditionally performs actual tagging and pushing or a dry-run simulation based on the dry_run input, consolidating logic and commands.

Changes

File(s) Change Summary
.github/workflows/docker-latest-tag.yml Replaced pull/tag/push steps with docker buildx imagetools create; added dry-run step; updated step names and conditions.

Poem

A hop and a tag, with Docker in tow,
Now buildx imagetools runs the show.
Whether dry-run or push, we choose with a flag,
No more pulling or tagging, just one easy tag.
The workflow’s more sleek, a carrot well-earned—
For every new image, a lesson well-learned! 🥕🐇


📜 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 bf3febb and 53944b4.

📒 Files selected for processing (1)
  • .github/workflows/docker-latest-tag.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/docker-latest-tag.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Build forest binaries on Linux AMD64
  • GitHub Check: Build MacOS
  • GitHub Check: cargo-publish-dry-run
  • GitHub Check: Build Ubuntu
  • GitHub Check: tests-release
  • GitHub Check: tests
  • GitHub Check: All lint checks

🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

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.

@LesnyRumcajs LesnyRumcajs force-pushed the fix-docker-retag-for-multiarch branch from 4c5674b to c7ae1d3 Compare July 10, 2025 11:49
@LesnyRumcajs LesnyRumcajs force-pushed the fix-docker-retag-for-multiarch branch from c7ae1d3 to 8b8c2b2 Compare July 10, 2025 12:03
@LesnyRumcajs LesnyRumcajs marked this pull request as ready for review July 10, 2025 12:16
@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner July 10, 2025 12:16
@LesnyRumcajs LesnyRumcajs requested review from akaladarshi and hanabi1224 and removed request for a team July 10, 2025 12:16
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: 1

🧹 Nitpick comments (2)
.github/workflows/docker-latest-tag.yml (2)

35-40: Trailing whitespace breaks YAML-lint

Line 36 contains trailing spaces which are currently flagged by the CI linter:

-        if: ${{ !fromJSON(github.event.inputs.dry_run) }}␠␠
+        if: ${{ !fromJSON(github.event.inputs.dry_run) }}

Remove the two stray spaces to satisfy YAMLlint.


35-44: Collapse duplicate commands & avoid copy-paste drift

Both the real and dry-run branches repeat two nearly identical imagetools create commands. The CLI supports multiple --tag flags, so the duplication can be removed:

-          docker buildx imagetools create --tag ghcr.io/chainsafe/forest:${{ github.event.inputs.new_tag }} ghcr.io/chainsafe/forest:${{ github.event.inputs.tag }}
-          docker buildx imagetools create --tag ghcr.io/chainsafe/forest:${{ github.event.inputs.new_tag }}-fat ghcr.io/chainsafe/forest:${{ github.event.inputs.tag }}-fat
+          docker buildx imagetools create \
+            --tag ghcr.io/chainsafe/forest:${{ github.event.inputs.new_tag }} \
+            --tag ghcr.io/chainsafe/forest:${{ github.event.inputs.new_tag }}-fat \
+            ghcr.io/chainsafe/forest:${{ github.event.inputs.tag }} \
+            ghcr.io/chainsafe/forest:${{ github.event.inputs.tag }}-fat

Repeating the same block twice makes future edits error-prone; consolidating it keeps both branches in sync.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 631e7b1 and bf3febb.

📒 Files selected for processing (1)
  • .github/workflows/docker-latest-tag.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/docker-latest-tag.yml

[error] 36-36: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: Build forest binaries on Linux AMD64
  • GitHub Check: tests
  • GitHub Check: tests-release
  • GitHub Check: Calibnet kademlia checks
  • GitHub Check: Calibnet no discovery checks
  • GitHub Check: Calibnet eth mapping check
  • GitHub Check: Bootstrap checks - Lotus
  • GitHub Check: State migrations
  • GitHub Check: Devnet checks
  • GitHub Check: Snapshot export checks
  • GitHub Check: Wallet tests
  • GitHub Check: Forest CLI checks
  • GitHub Check: Calibnet check
🔇 Additional comments (1)
.github/workflows/docker-latest-tag.yml (1)

26-26: Confirm runner label availability

runs-on: ubuntu-24.04-arm is a non-standard label; GitHub-hosted runners currently expose ubuntu-latest, ubuntu-22.04, and ubuntu-24.04 (preview) but not an explicit ARM variant.
Unless you operate a self-hosted runner with that exact label this job will queue forever.

Verify the label or switch to matrix strategy with runs-on: ubuntu-24.04 and docker/setup-qemu-action for cross-platform support.

@LesnyRumcajs LesnyRumcajs force-pushed the fix-docker-retag-for-multiarch branch from f7245f8 to 53944b4 Compare July 10, 2025 12:24
@LesnyRumcajs LesnyRumcajs enabled auto-merge July 10, 2025 12:45
@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Jul 10, 2025
Merged via the queue into main with commit 25179d0 Jul 10, 2025
35 checks passed
@LesnyRumcajs LesnyRumcajs deleted the fix-docker-retag-for-multiarch branch July 10, 2025 14:40
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.

4 participants