Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

ci: make name for digest artifact unique #1156

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Conversation

chrisgacsal
Copy link
Contributor

@chrisgacsal chrisgacsal commented Feb 2, 2024

Description

The actions/download-artifact@v4 action used in merge-and-push job uses a pattern filter to find all the digest artifacts uploaded for a specific image in order to combine them into a multi-arch container image. However the current filter set for this action is incorrect as it could allow to fetch digests for images which has similar name as the filter pattern uses the image name as a key.

So using the digests-7755142612-vmclarity-ui-* pattern also includes artifacts with name digests-7755142612-vmclarity-ui-backend-* which is not the desired behavior.

This change fixes this issue by using the SHA256 hash of the image name in the generated digest-cache-name used for naming and filtering the artifacts for image digests. This way we can reduce the chance for naming collisions.

Type of Change

[x] Bug Fix
[ ] New Feature
[ ] Breaking Change
[ ] Refactor
[ ] Documentation
[ ] Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@chrisgacsal chrisgacsal requested a review from a team as a code owner February 2, 2024 14:20
@chrisgacsal chrisgacsal self-assigned this Feb 2, 2024
@chrisgacsal chrisgacsal added bug Something isn't working ci Continious Integration related PRs labels Feb 2, 2024
paralta
paralta previously approved these changes Feb 2, 2024
Copy link

github-actions bot commented Feb 2, 2024

Hey!

Your images are ready:

  • ghcr.io/openclarity/vmclarity-apiserver-dev:pr1156-06e1d8c7216b886947f5f390ef51c4eb49170fbd
  • ghcr.io/openclarity/vmclarity-orchestrator-dev:pr1156-06e1d8c7216b886947f5f390ef51c4eb49170fbd
  • ghcr.io/openclarity/vmclarity-ui-backend-dev:pr1156-06e1d8c7216b886947f5f390ef51c4eb49170fbd
  • ghcr.io/openclarity/vmclarity-ui-dev:pr1156-06e1d8c7216b886947f5f390ef51c4eb49170fbd
  • ghcr.io/openclarity/vmclarity-cli-dev:pr1156-06e1d8c7216b886947f5f390ef51c4eb49170fbd
  • ghcr.io/openclarity/vmclarity-cr-discovery-server-dev:pr1156-06e1d8c7216b886947f5f390ef51c4eb49170fbd

@chrisgacsal chrisgacsal enabled auto-merge February 2, 2024 14:51
@chrisgacsal chrisgacsal added this pull request to the merge queue Feb 2, 2024
Merged via the queue into main with commit 2620fc5 Feb 2, 2024
37 checks passed
@chrisgacsal chrisgacsal deleted the ci-fix-artifact-name branch February 2, 2024 15:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working ci Continious Integration related PRs
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants