Fixes #37705 - 404 v1 search with v2 container clients#42
Merged
Conversation
vsedmik
approved these changes
Aug 7, 2024
vsedmik
left a comment
There was a problem hiding this comment.
Okay so packit/PRT failed at SatelliteQE/robottelo#15820 coz it tried to patch the smart_proxy_container_gateway at the SAT side. This is going to be fixed in CI.
Nevertheless I tested this locally with patched Caps and it passed.
(venv) [vsedmik@fedora robottelo]$ pytest tests/foreman/api/test_capsulecontent.py -k test_positive_sync_container_repo_end_to_end
...
======= 1 passed, 23 deselected, 9 warnings in 714.58s (0:11:54) =======
So giving ACK from my side.
chris1984
approved these changes
Aug 7, 2024
Member
chris1984
left a comment
There was a problem hiding this comment.
ACK looks good and works:
Without PR:
Logged in and out produce the same results:
[root@ip-10-0-168-78 ~]# podman search --tls-verify=false ip-10-0-168-217.rhos-01.prod.psi.rdu2.redhat.com/default_organization
[root@ip-10-0-168-78 ~]#With PR:
[root@ip-10-0-168-78 ~]# podman login --tls-verify=false ip-10-0-168-217.rhos-01.prod.psi.rdu2.redhat.com
Username: admin
Password:
Login Succeeded!
[root@ip-10-0-168-78 ~]# podman search --tls-verify=false ip-10-0-168-217.rhos-01.prod.psi.rdu2.redhat.com/default_organization
NAME DESCRIPTION
ip-10-0-168-217.rhos-01.prod.psi.rdu2.redhat.com/default_organization-capsule-containers-custom-docker
[root@ip-10-0-168-78 ~]# podman logout ip-10-0-168-217.rhos-01.prod.psi.rdu2.redhat.com
Removed login credentials for ip-10-0-168-217.rhos-01.prod.psi.rdu2.redhat.com
[root@ip-10-0-168-78 ~]# podman search --tls-verify=false ip-10-0-168-217.rhos-01.prod.psi.rdu2.redhat.com/default_organization
NAME DESCRIPTION
ip-10-0-168-217.rhos-01.prod.psi.rdu2.redhat.com/default_organization-capsule-containers-custom-docker
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.
Essentially https://github.com/Katello/katello/pull/11006/files but for the container gateway. For v2 container clients, don't use the old v1 search API endpoint. Instead, throw a 404.
To test, try doing
podman searchwith an actual search field. For example:This should return all container repositories with
default_organizationin the name.Without this PR, adding anything past the
/after the hostname causes nothing to get returned.Test with and without being logged in.