pulp / pulp-cli

https://docs.pulpproject.org/pulp_cli/
GNU General Public License v2.0
33 stars 41 forks source link

config command stopped working after 41538e6 #928

Closed decko closed 3 months ago

decko commented 3 months ago

Summary

After updating pulp-cli and pulp-glue to the latest version of main branch, the config command keeps complaining about the base_url field.

Steps to reproduce

Running the command:

pulp config create --username admin --password password --base-url http://localhost:5001/pulp/api/v3/

always return the following prompt:

Config file failed to parse. ('base_url' should be of the form '<schema>://<netloc>').
Continue without config? [y/N]:

Expected behavior

It should run without issues and create or update the config file.

Pulp and pulp-cli version info

Only happens after 41538e6. 8437376 and before is not affected by this.

mdellweg commented 3 months ago

And it's rightfully complaining. "/pulp/api/v3" is not part of the base_url. At best "/pulp/" is supposed to be the api_root. I forgot why we keep them separate, but that's the way it is. ~In any case your example never worked.~ Edit: It worked by accident. But everything after the hostname used to be ignored. Even in hindside this was a really bad user experience, because it may have lead to endless debugging on the wrong side of the street.

mdellweg commented 3 months ago

I remember now pulp_cli predates both the api-root and the domains feature so the semantics of base_url were already defined back then in the most convenient way. And for users of unrerouted pulp installations it is still convenient.