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 #36758 - Add content counts to capsule content view UI #10745

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

sjha4
Copy link
Member

@sjha4 sjha4 commented Sep 19, 2023

What are the changes introduced in this pull request?

Add UI bits for capsule content redesigned page with content counts.

Considerations taken when implementing this change?

What are the testing steps for this pull request?

  1. Add some CVs to environments tied to a capsule and run a sync.
  2. Check to see if content counts show up on the UI.

Have added all necessary changes to commits here for easier testing.

@theforeman-bot
Copy link

Issues: #36758

(cherry picked from commit c5dc9dd)
(cherry picked from commit d16c8b1)
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.

I think the counts are looking good! One thing I just noticed is that we have a discontinuity between our content unit naming on content views / smart proxies and repositories. Like "Container Image Tags" versus "Container tags".

Anyway, from a testing perspective it's looking good.

I'm currently looking into something weird, but it'll be unrelated to this PR... my CVV package count is different from the capsule package count, but CVV.packages is also a different number, and that number is ALSO different from what I get if I count up the packages reported in each of the CVVs repos... I'll report back if it's something that needs addressing here...

import ContentConfig from '../Content/ContentConfig';

const AdditionalCapsuleContent = ({ counts }) => {
console.log(counts);
Copy link
Member

Choose a reason for hiding this comment

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

Debug logs abound :)

@ianballou
Copy link
Member

ianballou commented Sep 20, 2023

I'm currently looking into something weird, but it'll be unrelated to this PR... my CVV package count is different from the capsule package count, but CVV.packages is also a different number, and that number is ALSO different from what I get if I count up the packages reported in each of the CVVs repos... I'll report back if it's something that needs addressing here...

It looks like the issue is that, on a content view version, we show the count of unique packages. However, here, are are counting up the total number of packages. This is a little problematic because we only get the counts from Pulp, not the NVRAs.

Some potential solutions:

  1. Don't aggregate the content units by content view version. Show the counts for each repositories within the content view version.
  2. Stop showing the unique package count on the content view version and instead count duplicates.
    -> While this would be a change in behavior that users might notice, at least it would get the count closer to the truth. A package in one repository isn't the same package as in the other repository. However, it might mean changing how in_repositories works...
  3. Add a "raw count" to content view versions that users can use to specifically compare content on the Foreman vs on the smart proxy.

Screenshots:

image

vs

image

@sjha4 sjha4 force-pushed the proxy_ui_with_cv_content_counts branch from 4552e23 to 02acf2c Compare September 25, 2023 19:10
@sjha4 sjha4 force-pushed the proxy_ui_with_cv_content_counts branch 2 times, most recently from c087dae to f4871aa Compare September 26, 2023 20:33
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.

I noticed that some repositories are missing content type names:

image

Looks like just Deb and OSTree.

webpack/scenes/Content/ContentConfig.js Outdated Show resolved Hide resolved
webpack/scenes/Content/ContentConfig.js Outdated Show resolved Hide resolved
@sjha4 sjha4 force-pushed the proxy_ui_with_cv_content_counts branch 3 times, most recently from c3c7f4a to cd36d7d Compare September 29, 2023 18:44
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.

Just found one typo:

webpack/scenes/Content/ContentConfig.js Outdated Show resolved Hide resolved
@ianballou
Copy link
Member

Looking good now!

image

@ianballou ianballou dismissed their stale review October 2, 2023 18:42

Changes were made

@sjha4 sjha4 force-pushed the proxy_ui_with_cv_content_counts branch 2 times, most recently from 0eda7d3 to 0a94506 Compare October 4, 2023 15:54
@sjha4
Copy link
Member Author

sjha4 commented Oct 4, 2023

[test katello]

@sjha4 sjha4 force-pushed the proxy_ui_with_cv_content_counts branch 2 times, most recently from 3e18b51 to 6d37ff9 Compare October 4, 2023 16:59
@sjha4 sjha4 force-pushed the proxy_ui_with_cv_content_counts branch from 6d37ff9 to 43f6720 Compare October 4, 2023 19:35
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.

Everything is looking good! Only one comment:

Should the repository entries be alphabetical?

image

@sjha4
Copy link
Member Author

sjha4 commented Oct 6, 2023

Sorting the repos by name is a little tricky given we only have access to ids in the content count json. We do have list of repositories on the UI and it should be possible to sort those. Opened an issue here: https://projects.theforeman.org/issues/36806 to work on that and move this PR along. Thanks @ianballou !

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.

Ack!

@sjha4 sjha4 merged commit 8199f33 into Katello:master Oct 6, 2023
4 of 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.

3 participants