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 #37871 - Granular capsule update content counts #11176

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

sjha4
Copy link
Member

@sjha4 sjha4 commented Oct 8, 2024

What are the changes introduced in this pull request?

The PR introduces parameters to control granularity of the smart proxy content counting method.

Considerations taken when implementing this change?

I had to acquire a lock on the proxy record because parallel sync tasks run for individual environments when a CV version is promoted to them. And each individual sync task triggers it's own content counting leading to a race condition where the last task that saves content_counts overwrites changes by other tasks.

What are the testing steps for this pull request?

To test:

  1. Test global content counting still works by running a capsule sync.
  2. To test granular content counting, turn the automatic counting off, make some changes isolated to one CV, publish, promote etc and ensure the content counts remain stale.
  3. Turn the automatic counting setting on and then promote a different CV to an env tied to a proxy.
  4. On this branch, post the sync and content count task, only the specific CV version repo counts will get updated. You can verify that in JSON value on proxy or on the UI for easy testing.

@vsedmik
Copy link

vsedmik commented Oct 18, 2024

During writing test automation an issue was discovered. I tried to workaround it but it persists even for the scenario when we filter out some content from a CV and publish/promote/sync it to the Capsule while automatic content counts update is disabled. So we end up with a new CV version present on the capsule (which is displayed correctly) but no counts calculated for it. UI wrongly says it's empty and hammer fails.
I would prefer to see No content counts calculated for this CV version yet or N/A in both, UI and hammer.
Screenshot from 2024-10-18 10-34-18

@sjha4 sjha4 force-pushed the granular_content_counting branch 3 times, most recently from e26f844 to 7ff5621 Compare October 25, 2024 20:27
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.

This is working well in my testing so far! I want to do a little more testing with more repositories, but all of the functionality works fine with one smart proxy, 2 LCEs, and one content view.

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.

Working well for me! Tested with varying numbers of content views. I even tested with 2000, but it wasn't super helpful because it totally bogged down the puma workers. That's a pretty ridiculous amount of CVs, fortunately.

@sjha4 sjha4 merged commit 90deb81 into Katello:master Oct 29, 2024
27 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.

3 participants