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 #36857 - Run content count update on smart proxy after orphan cleanup #10775

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

sjha4
Copy link
Member

@sjha4 sjha4 commented Oct 24, 2023

What are the changes introduced in this pull request?

Trigger a content count update task after running orphan cleanup

Considerations taken when implementing this change?

What are the testing steps for this pull request?

  1. Have a proxy and some content views/envs tied to it and sync the capsule.
  2. Check the result from endpoint /katello/api/capsules/:id/content/counts
  3. Remove an env from capsule and don't sync.
  4. Run bundle exec rails katello:delete_orphaned_content
  5. Check the result from endpoint /katello/api/capsules/:id/content/counts
  6. The content_counts will remain the same.
  7. Checkout this PR.
  8. Run bundle exec rails katello:delete_orphaned_content
  9. The content_counts should get updated to reflect only envs still tied to smart_proxy.

@sjha4
Copy link
Member Author

sjha4 commented Oct 24, 2023

Need to update the update_content_count method to update content_count instead of returning when repos is empty on capsule. Will do after either merging the other PR or will need to rebase.

@sjha4 sjha4 force-pushed the update_content_count_orphan_cleanup branch from 01f8217 to 8168a99 Compare October 25, 2023 13:34
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.

Works great for me!

@sjha4 sjha4 merged commit f07f474 into Katello:master Oct 27, 2023
5 checks passed
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.

2 participants