Skip to content

Conversation

@bupd
Copy link
Contributor

@bupd bupd commented Jan 23, 2025

Thank you for contributing to Harbor!

Comprehensive Summary of your change

  • Previously, No SBOM label was displayed for multi-arch images.
  • Now, SBOM column is Empty for Multi-arch images. Since child artifacts may have their own SBOMs.

Changes made

  • Added the hasChild method to check for the presence of child images. aka. detecting multi-arch images.
  • If mulit-arch images present 'No SBOM' will not be displayed since child artifacts can contain their own SBOMs.
  • Added Tests.

Screenshots

Before

No SBOM

After (SBOM column is empty for multi-arch images)

childs will have no sbom disables

Issue being fixed

Fixes #21424

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/update,area-ui"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

* Updated the `hasChild` method to check for the presence of
`child_digest` in the `references` array.
* This ensures that SBOMs are correctly displayed for multi-arch images,
where child artifacts may contain their own SBOMs.
* Previously, No SBOM label was displayed for multi-arch images.

Signed-off-by: bupd <[email protected]>
@codecov
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.49%. Comparing base (c8c11b4) to head (a2d984a).
Report is 465 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #21459      +/-   ##
==========================================
+ Coverage   45.36%   46.49%   +1.12%     
==========================================
  Files         244      253       +9     
  Lines       13333    14236     +903     
  Branches     2719     2925     +206     
==========================================
+ Hits         6049     6619     +570     
- Misses       6983     7266     +283     
- Partials      301      351      +50     
Flag Coverage Δ
unittests 46.49% <100.00%> (+1.12%) ⬆️

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

Files with missing lines Coverage Δ
...t/artifact-list-tab/artifact-list-tab.component.ts 48.36% <100.00%> (+6.28%) ⬆️

... and 177 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MinerYang
Copy link
Contributor

Hi @bupd ,
Thanks for your contribution.
Could you provide a final demo of this PR changes, a screenshot is fine.

@Vad1mo Vad1mo added the release-note/update Update or Fix label Feb 3, 2025
@bupd
Copy link
Contributor Author

bupd commented Feb 3, 2025

@MinerYang Updated the PR description with screenshot.

Thanks

@Vad1mo Vad1mo added target/2.13.0 issues that are targeting v2.13.0 kind/bug labels Mar 24, 2025
Copy link
Contributor

@xuelichao xuelichao left a comment

Choose a reason for hiding this comment

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

LGTM

@bupd
Copy link
Contributor Author

bupd commented Mar 29, 2025

hope we can merge this one.

Copy link
Member

@OrlinVasilev OrlinVasilev left a comment

Choose a reason for hiding this comment

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

lgtm

@Vad1mo Vad1mo added target/2.14.0 and removed target/2.13.0 issues that are targeting v2.13.0 labels Apr 7, 2025
@wy65701436 wy65701436 enabled auto-merge (squash) April 24, 2025 11:45
@wy65701436 wy65701436 merged commit 972965f into goharbor:main Apr 24, 2025
12 checks passed
wy65701436 pushed a commit to wy65701436/harbor that referenced this pull request May 16, 2025
fix: handle multi-arch images with SBOMs in HarborUI

* Updated the `hasChild` method to check for the presence of
`child_digest` in the `references` array.
* This ensures that SBOMs are correctly displayed for multi-arch images,
where child artifacts may contain their own SBOMs.
* Previously, No SBOM label was displayed for multi-arch images.

Signed-off-by: bupd <[email protected]>
OrlinVasilev pushed a commit to OrlinVasilev/harbor that referenced this pull request Oct 29, 2025
fix: handle multi-arch images with SBOMs in HarborUI

* Updated the `hasChild` method to check for the presence of
`child_digest` in the `references` array.
* This ensures that SBOMs are correctly displayed for multi-arch images,
where child artifacts may contain their own SBOMs.
* Previously, No SBOM label was displayed for multi-arch images.

Signed-off-by: bupd <[email protected]>
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.

UI displays 'No SBOM' for multi-architecture images despite SBOM availability

7 participants