-
Notifications
You must be signed in to change notification settings - Fork 28
[ISV-5787] Remove child digests from externalRefs #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@jedinym please take a look. Thanks |
| _, val = self.digest.split(":") | ||
| return val | ||
|
|
||
| def purls(self, index_digest: Optional[str] = None) -> list[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: I think this argument should no longer be Optional with a default value.
| def purls(self, index_digest: Optional[str] = None) -> list[str]: | |
| def purls(self, index_digest: str) -> list[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call on making it non-Optional. When I checkout the PR locally, my editor reports type errors which seem like potentially genuine bugs. Will comment inline
|
@BorekZnovustvoritel What is the process on getting this into usage? Do we need to merge and wait for the image to be built, then change the digest in build-definitions? |
Yes, I think so. Refer to this PR |
BorekZnovustvoritel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this should work fine.
chmeliik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mavaras could you please update the commit message(s) to explain what is being done and why? I have no context for this
sbom-utility-scripts/scripts/index-image-sbom-script/index_image_sbom_script.py
Outdated
Show resolved
Hide resolved
sbom-utility-scripts/scripts/index-image-sbom-script/index_image_sbom_script.py
Outdated
Show resolved
Hide resolved
3189c1e to
e2531b6
Compare
sbom-utility-scripts/scripts/index-image-sbom-script/index_image_sbom_script.py
Outdated
Show resolved
Hide resolved
sbom-utility-scripts/scripts/index-image-sbom-script/index_image_sbom_script.py
Outdated
Show resolved
Hide resolved
| def purls(self) -> list[str]: | ||
| qualifiers = {"repository_url": self.repository} | ||
| if self.arch is not None: | ||
| qualifiers["arch"] = self.arch | ||
|
|
||
| purl = PackageURL( | ||
| type="oci", | ||
| name=self.name, | ||
| version=self.digest, | ||
| qualifiers=qualifiers, | ||
| ).to_string() | ||
|
|
||
| return [purl] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function always returns a single value, let's ditch the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR updated
jedinym
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests failed, PTAL. I think that we're currently using the arch-specific digests instead of the index image digests as intended
Btw, you can run tests with tox locally
Tests updated. Passing locally |
Ah, I think it was the script code that needed an update, not the tests. Now, the test data has different digests in the purl for the |
- Updates build-time index SBOM creation script - Udpates tests accordingly
|
/ok-to-test |
|
LGTM |
|
/retest |
|
/ok-to-test |
|
quay.io is not too stable these days, huh /retest |
|
another 502 |
The build-time index SBOM creation script does not create index image SBOMs as per guidelines (the externalRefs should only contain purls with versions pointing to the index image, not the child digests).