Skip to content

ROX:34136, ROX:34137: Fix tagless images' name and link display under CVE and Deployment pages#19992

Open
charmik-redhat wants to merge 1 commit intomasterfrom
ROX-34137/fix-tagless-images-names-under-cve-and-deployment-single-pages
Open

ROX:34136, ROX:34137: Fix tagless images' name and link display under CVE and Deployment pages#19992
charmik-redhat wants to merge 1 commit intomasterfrom
ROX-34137/fix-tagless-images-names-under-cve-and-deployment-single-pages

Conversation

@charmik-redhat
Copy link
Copy Markdown
Contributor

Description

When FlattenImageData is enabled, the image id field becomes a UUID instead of a SHA digest. Several views in Workload CVEs used the id field as a fallback display value for tagless images (via ImageNameLink and getImageBaseNameDisplay), causing UUIDs to appear instead of digests.

This PR adds a digest field to the Image GraphQL type and passes it to the UI so that tagless images always display the SHA digest regardless of the FlattenImageData flag.

Changes

Backend — central/graphql/resolvers/images.go

  • Exposes a new digest: String! field on the Image GraphQL type. For V1 images this equals the image ID; for V2 (flattened) images this is the separate SHA digest.

UI — ImageResourceTable.tsx (Deployment single page → Resources tab)

  • Adds digest to the imageResourcesFragment GraphQL query and ImageResources type.
  • Passes digest to ImageNameLink so tagless images display remote@sha256:... instead of remote@.

UI — table.utils.ts (Workload CVE single page)

  • Adds digest to the imageMetadataContextFragment GraphQL fragment. This fragment is consumed by AffectedImagesTable and other CVE-scoped tables, so the digest is available wherever
    ImageNameLink renders an image name.

The ImageNameLink component (ImageNameLink.tsx:30) already prefers digest over id when present (const imageShaForDisplay = digest || id), so the fix is purely about fetching and passing the
new field.

User-facing documentation

  • CHANGELOG update is not needed
  • documentation is not needed

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

  • Deployed with FlattenImageData enabled, navigated to a Workload CVE single page and verified tagless images display SHA instead of a UUID.
  • Verified the same fix on the Deployment single page → Resources tab.
  • Confirmed no regression with FlattenImageData disabled — behavior is unchanged since digest equals id for V1 images.

… images

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.57%. Comparing base (7112f27) to head (cd9d549).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19992   +/-   ##
=======================================
  Coverage   49.57%   49.57%           
=======================================
  Files        2765     2765           
  Lines      208478   208482    +4     
=======================================
+ Hits       103354   103358    +4     
  Misses      97468    97468           
  Partials     7656     7656           
Flag Coverage Δ
go-unit-tests 49.57% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

🚀 Build Images Ready

Images are ready for commit cd9d549. To use with deploy scripts:

export MAIN_IMAGE_TAG=4.11.x-649-gcd9d549bee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant