Skip to content
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

Merged
merged 1 commit into from Apr 29, 2019

Conversation

daviddavis
Copy link
Contributor

@daviddavis daviddavis force-pushed the issue4678 branch 2 times, most recently from 769f3df to f9c8a8e Compare April 26, 2019 13:28
@daviddavis daviddavis force-pushed the issue4678 branch 2 times, most recently from 004a3a8 to 1ebe344 Compare April 26, 2019 13:38
asmacdo added a commit to asmacdo/pulp_python that referenced this pull request Apr 26, 2019
@daviddavis daviddavis requested a review from a team April 26, 2019 14:07
daviddavis pushed a commit to daviddavis/pulpcore-plugin that referenced this pull request Apr 26, 2019
FILE_PUBLICATION_PATH = urljoin(BASE_PUBLICATION_PATH, 'file/file/')

FILE_PUBLISHER_PATH = urljoin(BASE_PUBLISHER_PATH, 'file/file/')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate this :)

@daviddavis daviddavis force-pushed the issue4678 branch 3 times, most recently from 14195e9 to 0942d69 Compare April 26, 2019 16:09
Copy link

@nixocio nixocio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rochacbruno, any comment?

daviddavis pushed a commit to daviddavis/pulpcore-plugin that referenced this pull request Apr 26, 2019
@codecov
Copy link

codecov bot commented Apr 26, 2019

Codecov Report

Merging #103 into master will decrease coverage by 0.04%.
The diff coverage is 94.44%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
pulpcore/app/serializers/__init__.py 100% <ø> (ø) ⬆️
pulpcore/app/serializers/repository.py 100% <ø> (+1.02%) ⬆️
pulpcore/app/serializers/publication.py 98.88% <94.44%> (-1.12%) ⬇️
pulpcore/app/viewsets/task.py 97.01% <0%> (-1.5%) ⬇️
pulpcore/app/models/publication.py 72% <0%> (+1.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ad7ddf...173de7f. Read the comment docs.

@nixocio
Copy link

nixocio commented Apr 26, 2019

@daviddavis, we do have an extra step to test generated bindings, and this step is failing.

@daviddavis
Copy link
Contributor Author

@kersommoura yes, the problem is there's no way to require a bindings PR here AFAICT.

@daviddavis daviddavis force-pushed the issue4678 branch 2 times, most recently from 4de9eda to 01455ce Compare April 27, 2019 16:22
@@ -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):
Copy link
Member

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 ?

Copy link
Contributor Author

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):
Copy link
Member

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?

Copy link
Member

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.

Copy link
Contributor Author

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'.

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

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.

asmacdo added a commit to asmacdo/pulp_python that referenced this pull request Apr 29, 2019
Copy link
Member

@bmbouter bmbouter left a 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 🦅 🍰 🎆

@dkliban dkliban merged commit 5dd64f6 into pulp:master Apr 29, 2019
@daviddavis daviddavis deleted the issue4678 branch April 29, 2019 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants