Fixes #38862 - Handle nil host UUIDs properly#60
Merged
sjha4 merged 1 commit intoKatello:mainfrom Dec 2, 2025
Merged
Conversation
547e515 to
23fc6f2
Compare
23fc6f2 to
0e4003d
Compare
ianballou
reviewed
Dec 1, 2025
Member
ianballou
left a comment
There was a problem hiding this comment.
Looking fine, just some test questions.
| ] | ||
|
|
||
| put '/update_hosts', { 'hosts' => hosts } | ||
| assert last_response.ok? |
Member
There was a problem hiding this comment.
This test doesn't verify that no hosts were added to the DB.
| @@ -232,7 +234,11 @@ def extract_auth_required_repo_names(repos) | |||
| end | |||
|
|
|||
| def update_host_repositories(uuid, repositories) | |||
Member
There was a problem hiding this comment.
Should we add a test with nil UUIDs in test/container_gateway_backend_test.rb ?
Member
Author
There was a problem hiding this comment.
Used claude and it added some tests that cover some blank uuid cases.. 🤖
0e4003d to
a0bae61
Compare
ianballou
approved these changes
Dec 2, 2025
This file contains hidden or 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
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.
Add some nil UUID handling. This will work independently of the Katello changes : Katello/katello#11569 which prevents katello from sending this nil values by switching to use subscription UUID as the host identifier.
To test,
Register a host to a Smart proxy.
In console, empty out the content facet UUID.
Sync the smart proxy.
The sync should succeed. Try normal workflows like 2 registered hosts with one nil UUID and another with UUID etc.