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

A 'repository' keyword to python_distribution module #162

Closed
wants to merge 2 commits into from

Conversation

stejoo
Copy link
Contributor

@stejoo stejoo commented Jun 13, 2024

Many Pulp plugins allow a distribution to track the latest RepositoryVersion of a repository. This PR adds support for that functionality to the python_distribution module.

This makes maintaining custom Python repositories easier by not having to retrieve and update the latest publication to distribute. The repository is immediately updated when a developer uploads an updated Python package to the repository. Decreasing the effort required, by Ansible and me, to squeeze my Pulp into shape. 😉

I hope everything is up to par, otherwise please point out or explain to me the areas I need to patch up and I will have a look at it as soon as I am able.

Pulp Python plugin supports setting up a distribution to track the
latest RepositoryVersion of a Pulp Python repository.
Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

This looks good!
Just one small thing to try.

Comment on lines -131 to +150
entity_plural="distribuions",
entity_plural="distributions",
Copy link
Member

Choose a reason for hiding this comment

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

👍

repository_ctx = PulpPythonRepositoryContext(
module.pulp_ctx, entity={"name": repository_name}
)
desired_attributes["repository"] = repository_ctx.pulp_href
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind trying if this worked too?

Suggested change
desired_attributes["repository"] = repository_ctx.pulp_href
desired_attributes["repository"] = repository_ctx

I think glue should be able to resolve that.

@mdellweg
Copy link
Member

And for the CI to pass, you'd need to rerecord the fixtures for this module.

@mdellweg
Copy link
Member

mdellweg commented Jul 4, 2024

I merged the change by hand...

@mdellweg mdellweg closed this Jul 4, 2024
@stejoo
Copy link
Contributor Author

stejoo commented Jul 4, 2024

Thanks @mdellweg . I haven't been able to spend more time on this as I had other priorities. This PR is currently the last item on my TODO of today. Which I had hopes to reach this morning... but alas Pulp is giving me trouble with permissions in the container repository space so I have other things to tend to.

Next time I'll reply back sooner to let you know I'll get to it when I can. My apologies.

@mdellweg
Copy link
Member

mdellweg commented Jul 4, 2024

No problem. I just want to release soon and this looked like a good thing to wrap up.

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.

2 participants