-
Notifications
You must be signed in to change notification settings - Fork 138
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
OCM-3226 | feat: improving ocm login and ocm list rh-region url resolution #599
OCM-3226 | feat: improving ocm login and ocm list rh-region url resolution #599
Conversation
New url config fallback behavior:
New url fallback behavior plus
|
Can we add some tests here to confirm the behavior? |
added tests for the now shared |
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.
Can we squash down these commits before we merge 🙏
…e url saved in config before falling back to api.openshift.com refactoring gateway url resolution to a common function creating tests for the urls.ResolveGatewayURL ResolveGatewayURL now as a final step, tries to parse the resolved URL using url.ParseRequestURI and return an error if that fails, improved test coverage tweak output for clarity fixing lint errors
4a54942
to
d0f8459
Compare
squash on merge? thats the convenient option unless a bot that cant squash is doing the merging or something. Anyway, I figured out how to do it the inconvenient way and force pushed 😄 |
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.
lgtm
This MR tweaks the
ocm login --url
resolution algorithm to try to reusecfg.URL
before falling back to "api.openshift.com". New--url
resolution algorithm (from highest priority to lowest priority):--url
cli arg (key found inurlAliases
)--url
cli arg (non-empty string)URL
value (non-empty string)I also improved the recently added
ocm list rh-region
to be a bit more helpful:--discovery-url
flag with the same url resolution behavior asocm login