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
Add relative_url as a valid config key for export distributor #743
Conversation
ok test |
1 similar comment
ok test |
@seandst I think originally you checkouted from 2.7 and made the changes. So either you submitted against wring branch or you were supposed to checkout from master. Please fix that |
@@ -109,6 +109,10 @@ def validate_export_config(config): | |||
if not os.path.isabs(value): | |||
msg = _("Value for 'export_dir' must be an absolute path: %s" % value) | |||
return False, msg | |||
if key == constants.RELATIVE_URL_KEYWORD: |
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.
this will work only for API, you forgot to add the option for pulp-admin https://github.com/seandst/pulp_rpm/blob/1394-relative-url-export-config/extensions_admin/pulp_rpm/extensions/admin/export.py#L53
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.
That's intentionally left out of this PR.
@seandst also i think you should add the condition check of the situation where both export_dir and relative_url are provided and raise the error that you cannot use them together. |
Once this is merged, I can test it off of the nightly. |
@beav it'll be a little while, I think, since this is currently (to use a technical term) broken as crap I'll keep you updated. :) |
f55e15c
to
d97636d
Compare
This has been fixed up and should now work as intended, so it's ready for review. I also added a fix to #1419, so you can now use the You can also use the rest api to make the change before the export call. httpie e.g. |
ok test |
@seandst i noticed that during repo creation( via pulp-admin), when you specify --relative url option it affects only yum_dist and not export_dist. Via API it works as supposed.
|
@seandst as far as i see you need to add relative_url to the export_dist_config_keys, which defaults to repo-id https://github.com/seandst/pulp_rpm/blob/1394-relative-url-export-config/extensions_admin/pulp_rpm/extensions/admin/repo_create_update.py#L37 |
This is how it should work. Having relative-url affect the export distribute would be a backward-incompabile change. That's what https://pulp.plan.io/issues/1419 is about, so we can talk about it more there. |
I got a conditional and verbal lgtm from ipanova after an IRC discussion. The condition is that the pulp-admin commit get moved into a second PR, and we'll discuss that bit further and address it in redmine #1419. |
d97636d
to
1d959a6
Compare
https://pulp.plan.io/issues/1394
fixes #1394
pulp-admin support is conspicuously absent. There are some decisions to make for that, so I've opened up a new issue related to 1394 to deal with them.