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
Remove RepositoryPublishURLSerializer and use PublicationSerializer #103
Conversation
769f3df
to
f9c8a8e
Compare
004a3a8
to
1ebe344
Compare
RequiredPR: pulp/pulpcore-plugin#93 RequiredPR: pulp/pulpcore#103 https://pulp.plan.io/issues/4699 fixes #4699
ref #4678 Required PR: pulp/pulpcore#103 Required PR: https://github.com/pulp/pulp_file
FILE_PUBLICATION_PATH = urljoin(BASE_PUBLICATION_PATH, 'file/file/') | ||
|
||
FILE_PUBLISHER_PATH = urljoin(BASE_PUBLISHER_PATH, 'file/file/') |
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.
I appreciate this :)
14195e9
to
0942d69
Compare
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.
@rochacbruno, any comment?
ref #4678 Required PR: pulp/pulpcore#103 Required PR: pulp/pulp_file#207
Codecov Report
@@ Coverage Diff @@
## master #103 +/- ##
==========================================
- Coverage 67.83% 67.79% -0.05%
==========================================
Files 65 65
Lines 3019 3015 -4
==========================================
- Hits 2048 2044 -4
Misses 971 971
Continue to review full report at Codecov.
|
@daviddavis, we do have an extra step to test generated bindings, and this step is failing. |
@kersommoura yes, the problem is there's no way to require a bindings PR here AFAICT. |
4de9eda
to
01455ce
Compare
@@ -69,3 +70,28 @@ def gen_file_remote(url=None, **kwargs): | |||
url = FILE_FIXTURE_MANIFEST_URL | |||
|
|||
return gen_remote(url, **kwargs) | |||
|
|||
|
|||
def publish(cfg, repo, version_href=None, publisher=None): |
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.
Do we want this to come from pulp_smash.pulp3.utils or here?
Should this still be publish
? It seems like it should be create_publication
or gen_publication
or ?
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.
I didn't move this into pulp_smash.pulp3.utils
because this is strictly for the file plugin. Each plugin will create its publication a bit differently with a different endpoint, params, etc so I don't think it can or should be generalized and moved into pulp_smash.pulp3.utils
. I can update it to create_publication
.
@@ -69,3 +70,28 @@ def gen_file_remote(url=None, **kwargs): | |||
url = FILE_FIXTURE_MANIFEST_URL | |||
|
|||
return gen_remote(url, **kwargs) | |||
|
|||
|
|||
def create_publication(cfg, repo, version_href=None, publisher=None): |
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.
Does it make any sense to import this from here?
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.
Or maybe instead call it a generic publication? I think that's part of my confusion is that this is in pulpcore but it says it's specific to the file plugin.
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.
So currently I can run pulpcore's smash tests without pulp_file installed. It just skips over the using_plugin smash tests. If I try to import this function from pulp_file and I run the smash tests, I get ModuleNotFoundError: No module named 'pulp_file'
.
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.
We could import guard it to avoid that issue. Since they will be skipped that is ok. I think we should avoid duplicating this create_publication code into all the plugins. What do you think?
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 code won't go into all plugins. It's specific to the file plugin. Each plugin will have its own publication path, params, etc and thus will require its own create_publication function.
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.
I was talking about the duplication of the one from pulp_file specifically. It's duplicated here, and again in pulp-certguard.
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.
After some IRC discussion we are going to leave this here and not import from pulp_file.
RequiredPR: pulp/pulpcore-plugin#93 RequiredPR: pulp/pulpcore#103 https://pulp.plan.io/issues/4699 fixes #4699
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 all looks good to me. Thanks @daviddavis 🦅 🍰 🎆
Required PR: pulp/pulpcore-plugin#93 Required PR: pulp/pulp_file#207 Required PR: pulp/pulp-certguard#19 ref pulp#4678 https://pulp.plan.io/issues/4678
refs #4678
https://pulp.plan.io/issues/4678
Please be sure you have read our documentation on creating PRs:
https://docs.pulpproject.org/en/3.0/nightly/contributing/pull-request-walkthrough.html