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 create tags for manifests when pushing by digest #884

Merged
merged 1 commit into from
Jul 4, 2022

Conversation

lubosmj
Copy link
Member

@lubosmj lubosmj commented Jun 29, 2022

closes #852

@lubosmj lubosmj force-pushed the push-by-tag-not-supported-852 branch from 9637aa1 to e7f433b Compare July 1, 2022 09:53
tags_to_remove = models.Tag.objects.filter(
pk__in=repository.latest_version().content.all(), name=tag
).exclude(tagged_manifest=manifest)
add_content_units = [str(tag.pk), str(manifest.pk)]
Copy link
Member

@ipanova ipanova Jul 1, 2022

Choose a reason for hiding this comment

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

how about you define add_content_units = [str(manifest.pk)] and remove_content_units= [] empty lists before line 992 and then you just append tag.pk

Copy link
Member

Choose a reason for hiding this comment

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

this way you will avoid the else block

Copy link
Member

@ipanova ipanova left a comment

Choose a reason for hiding this comment

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

Thank you!

@lubosmj lubosmj merged commit ada3f58 into pulp:main Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

push of a manifest list produces tags for image manifest by digest
2 participants