Skip to content

Conversation

ruokun-niu
Copy link
Contributor

This pull request introduces a new image validation workflow into the release process to ensure that all Drasi container images meet architecture requirements before a release is finalized. The workflow checks for the presence of required architectures (amd64 and arm64) for each image, tests pulling images on real hardware runners, and integrates these checks into the existing release pipeline.

Release process improvements:

  • Added a new validate-images job to the .github/workflows/draft-release.yml workflow, which runs after manifest creation and before the final release, ensuring image validation is a required step for releases. [1] [2]

Image validation workflow:

  • Introduced a new workflow file, .github/workflows/image-validation.yml, which:
    • Validates that all images for the specified release tag exist and support the required architectures (most images require both amd64 and arm64; reaction-dataverse only requires amd64).
    • Repeats the validation for "azure-linux" image variants.
    • Tests pulling all images on both amd64 and arm64 runners to confirm images can be pulled successfully on each architecture.
    • Fails the release if any images are missing, lack required architecture support, or cannot be pulled on the appropriate hardware.
  • This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Drasi (issue link optional).

Fixes: #issue_number

Copy link
Member

@amansinghoriginal amansinghoriginal left a comment

Choose a reason for hiding this comment

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

Approving with suggestions.

echo ""
echo "✅ SUCCESS: All images meet their architecture requirements for version $IMAGE_TAG"

- name: Validate azure-linux variant architecture support
Copy link
Member

Choose a reason for hiding this comment

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

Would a matrix strategy be better to reduce the workflow file size?
Something like:

   multi-arch-validation:
...
     strategy:
       matrix:
         variant: ["", "-azure-linux"]
     steps:
       - name: Validate ${{ matrix.variant || 'default' }} variant architecture support
         run: |
          IMAGE_TAG="${{ needs.get-version.outputs.image_tag }}${{ matrix.variant }}"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Will update this

Copy link
Contributor

Choose a reason for hiding this comment

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

Can it make use of the existing matrix?


for image in $DRASI_IMAGES; do
# Skip reaction-dataverse unless we're on x86-64 runner
if echo "$AMD64_ONLY_IMAGES" | grep -q "$image" && [[ "${{ matrix.runner }}" != "oracle-vm-8cpu-32gb-x86-64" ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

Should we check like [[ "${{ matrix.arch }}" == "arm64" ]] instead of the runner name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion

echo "📋 Using image tag: ${{ needs.get-version.outputs.image_tag }}-azure-linux"

# Images that only need amd64 support
AMD64_ONLY_IMAGES="ghcr.io/drasi-project/reaction-dataverse"
Copy link
Contributor

Choose a reason for hiding this comment

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

This could come from the matrix too

Signed-off-by: ruokun-niu <[email protected]>
@ruokun-niu ruokun-niu force-pushed the image-validation-workflow branch from 28e49a5 to 8892617 Compare September 25, 2025 04:09
- arch: amd64
runner: oracle-vm-8cpu-32gb-x86-64
variant: ""
amd64_only_images: "ghcr.io/drasi-project/reaction-dataverse"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we only doing an amd64 build for dataverse?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Dataverse reaction is only built with amd64 architecture in the release workflow. IIRC, we had a dependency that would only work when we build the image in amd architecture.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the dependencies, there is nothing that stands out as being an issue. Can we confirm this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep let me check again

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added the arm64 variant of the dataverse reaction to both the release workflow and the image validation workflow

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.

3 participants