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

Fixes #36428 - Don't trigger pulp tasks on ignorable_content updates #10578

Merged
merged 1 commit into from
Jun 9, 2023

Conversation

sjha4
Copy link
Member

@sjha4 sjha4 commented May 30, 2023

What are the changes introduced in this pull request?

Ignorable_content is a param on pulp repository sync API and isn't stored anywhere other than katello. An update to ignorable_content shouldn't trigger unnecessary pulp tasks since we don't actually update anything in pulp. A sync will perform all the required steps to ignore updated list.

Considerations taken when implementing this change?

What are the testing steps for this pull request?

  1. Create a yum repo with Ignore SRPMs and Ignore treeinfo blank.
  2. Update either of those values.
  3. Monitor the foreman task for Repository::Update
  4. There shouldn't be any pulp task steps run in the Repository::Update task.

Ex srpm repo to test srpm is ignored in the next sync: https://fixtures.pulpproject.org/srpm-unsigned/
Ex treeinfo repo to test ignore treeinfo: https://www.keepersecurity.com/kcm/2/el/8/x86_64 (Note: sync will fail without ignoring treeinfo)
Make sure your repo isn't doing an additive sync cause that will not delete srpms that have been synced on repo before.

@theforeman-bot
Copy link

Issues: #36428

Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

Found another improvement:

@@ -407,7 +407,7 @@ def on_demand?

def pulp_update_needed?
changeable_attributes = %w(url unprotected checksum_type docker_upstream_name download_policy mirroring_policy verify_ssl_on_sync
Copy link
Member

Choose a reason for hiding this comment

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

We don't need mirroring_policy either since it's passed in at sync time too:

Suggested change
changeable_attributes = %w(url unprotected checksum_type docker_upstream_name download_policy mirroring_policy verify_ssl_on_sync
changeable_attributes = %w(url unprotected checksum_type docker_upstream_name download_policy verify_ssl_on_sync

Copy link
Member Author

Choose a reason for hiding this comment

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

Added mirroring policy.. 👍🏼

Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

Nice!

@sjha4 sjha4 merged commit 22140b0 into Katello:master Jun 9, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants