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

Expose batch_qs() to the plugin API #4607

Closed
quba42 opened this issue Oct 25, 2023 · 2 comments · Fixed by #4627
Closed

Expose batch_qs() to the plugin API #4607

quba42 opened this issue Oct 25, 2023 · 2 comments · Fixed by #4627
Labels

Comments

@quba42
Copy link
Contributor

quba42 commented Oct 25, 2023

If there are no concerns, I would like to have batch_qs from https://github.com/pulp/pulpcore/blob/main/pulpcore/app/util.py#L182

Made available to plugins here: https://github.com/pulp/pulpcore/blob/main/pulpcore/plugin/util.py#L15

The reason, is that I need this helper function to fix pulp/pulp_deb#921 and I would prefer not to duplicate it.

See also: https://discourse.pulpproject.org/t/exposing-new-things-to-the-plugin-api/1021

Note: I am fine with duplicating the pulpcore function for any pulp_deb backports, and switching to the pulpcore version with whatever pulpcore release first exposes it. So there is no need to backport the pulpcore change anywhere.

quba42 added a commit to ATIX-AG/pulpcore that referenced this issue Oct 26, 2023
closes pulp#4607

pulp_deb has a use case for finding the duplicates, but then needs to
perform additional processing to decide whether to actually remove them
or not. This change splits a find_duplicates function out from
remove_duplicates to facilitate this.
quba42 added a commit to ATIX-AG/pulpcore that referenced this issue Oct 26, 2023
closes pulp#4607

pulp_deb has a use case for finding the duplicates, but then needs to
perform additional processing to decide whether to actually remove them
or not. This change splits a find_duplicates function out from
remove_duplicates to facilitate this.
@quba42
Copy link
Contributor Author

quba42 commented Oct 26, 2023

Ok, so my request may have been premature, the draft PR I added would allow me to reuse more pulpcore code than exposing batch_qs would. However, it needs to be analyzed carefully to ensure it is performance neutral. If not, I am back to my plan of writing my own version of pulpcore's remove_duplicates in pulp_deb, thus making use of batch_qs.

@quba42
Copy link
Contributor Author

quba42 commented Oct 31, 2023

The approach from my draft PR turned out to be a complete dead end, so I am back to needing batch_qs exposed.
In fact I now have a working (draft PR) in pulp_deb that uses it: pulp/pulp_deb#922

quba42 added a commit to ATIX-AG/pulpcore that referenced this issue Oct 31, 2023
quba42 added a commit to ATIX-AG/pulpcore that referenced this issue Oct 31, 2023
quba42 added a commit to ATIX-AG/pulpcore that referenced this issue Nov 2, 2023
quba42 added a commit to ATIX-AG/pulpcore that referenced this issue Nov 2, 2023
mdellweg pushed a commit that referenced this issue Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
2 participants