Skip to content
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

Do not delete sig/att/sbom if subject image exists #116

Merged
merged 1 commit into from
May 27, 2024

Conversation

rcerven
Copy link
Contributor

@rcerven rcerven commented May 23, 2024

when getting all tags in registry we are listing only active tags, if tag was removed for the image, image still will be in registry if it is part of image index

if manifest digest isn't present in any of active tags, try query also manifest digest to verify its presence

STONEBLD-2466

@openshift-ci openshift-ci bot requested review from mmorhun and psturc May 23, 2024 16:50
@arewm arewm requested a review from lcarva May 23, 2024 17:19
Copy link

@lcarva lcarva left a comment

Choose a reason for hiding this comment

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

🌮


with self.assertRaisesRegex(AssertionError, expected_regex="no logs of level INFO"):
with self.assertLogs(LOGGER) as logs:
remove_tags(tags, QUAY_TOKEN, "some", "repository", dry_run=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

It does not make sense to set dry_run=True here. When it is True, delete_image_tag will be never called under whatever conditions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well it was in that other test above :)

@rcerven
Copy link
Contributor Author

rcerven commented May 27, 2024

added caching, so we will query manifest only once

when getting all tags in registry we are listing only active tags,
if tag was removed for the image, image still will be in registry
if it is part of image index

if manifest digest isn't present in any of active tags,
try query also manifest digest to verify its presence

also re-enable pruner

STONEBLD-2466

Signed-off-by: Robert Cerven <[email protected]>
Copy link

openshift-ci bot commented May 27, 2024

@rcerven: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/image-controller-e2e abe2b63 link true /test image-controller-e2e

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci openshift-ci bot added the lgtm label May 27, 2024
@rcerven rcerven merged commit 461daea into konflux-ci:main May 27, 2024
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants