-
Notifications
You must be signed in to change notification settings - Fork 284
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 #36430 - Get arch restriction data from all repos, not just those with URL #10581
Merged
jeremylenz
merged 3 commits into
Katello:master
from
jeremylenz:36430-arch-restriction-label-hi
Jun 2, 2023
Merged
Fixes #36430 - Get arch restriction data from all repos, not just those with URL #10581
jeremylenz
merged 3 commits into
Katello:master
from
jeremylenz:36430-arch-restriction-label-hi
Jun 2, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Issues: #36430 |
jeremylenz
force-pushed
the
36430-arch-restriction-label-hi
branch
from
June 1, 2023 16:53
6b3ae76
to
3d25286
Compare
Updated to handle the case where a product has >1 repo. ready for review |
jeremylenz
changed the title
Fixes #36430 - Get arch restriction data from product, not repositories
Fixes #36430 - Get arch restriction data from root, not repositories
Jun 1, 2023
lfu
reviewed
Jun 1, 2023
lfu
reviewed
Jun 1, 2023
@lfu Updated. |
lfu
approved these changes
Jun 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
jeremylenz
changed the title
Fixes #36430 - Get arch restriction data from root, not repositories
Fixes #36430 - Get arch restriction data from all repos, not just those with URL
Jun 3, 2023
lfu
pushed a commit
to lfu/katello
that referenced
this pull request
Jun 21, 2023
…atello#10581) * Fixes #36430 - Get arch restriction data from product, not repositories so that arch restriction labels show up properly in RepositorySetsTab (cherry picked from commit 338eb1d)
wbclark
pushed a commit
to wbclark/katello
that referenced
this pull request
Sep 7, 2023
…atello#10581) * Fixes #36430 - Get arch restriction data from product, not repositories so that arch restriction labels show up properly in RepositorySetsTab (cherry picked from commit 338eb1d)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the changes introduced in this pull request?
On the Repository Sets tab, the arch restriction label ("x86_64" in the image above) was based on
(where
pc
is aKatello::ProductContent
).pc.repositories
runs the queryBecause of the
has_url
,pc.repositories
will not return any repository that doesn't have a URL. So if you have a product with an empty repository, or a repository that doesn't yet have an Upstream URL set,pc.repositories
would return[]
, meaning the arch restriction label would not be properly displayed.With this change, the query doesn't filter out any repositories, thus allowing a correct arch restriction label in the UI.
Considerations taken when implementing this change?
Originally the new query was using
pc.product.root_repositories.first
but I realized that would cause an incorrect arch restriction label if you had more than one repo in your product.What are the testing steps for this pull request?
Create custom products with repos that don't have an upstream URL
Restrict the architecture on one of these repos, but leave the other unrestricted
Verify that the arch restriction label shows up correctly on all custom repos.