Skip to content

Deprecate RepositoryVersion.content_batch_qs - #8088

Open
gerrod3 wants to merge 1 commit into
pulp:mainfrom
gerrod3:rv-content-batches-deprecate
Open

Deprecate RepositoryVersion.content_batch_qs#8088
gerrod3 wants to merge 1 commit into
pulp:mainfrom
gerrod3:rv-content-batches-deprecate

Conversation

@gerrod3

@gerrod3 gerrod3 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

After talking to sol it pointed out this method is really bad, it does the unnest(content_ids) operation for each slice it generates. No plugin seems to use this and django's .iterator() method does what we need. If you need batches you can wrap the iterator call with itertools.batches and it will be correct without paying the unnest penalty for each batch.

Assisted-by: gpt-5.6-sol

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

Comment thread pulpcore/app/models/repository.py Outdated
Comment on lines +1074 to +1075
deprecation_logger.warning(
"content_batch_qs is deprecated. Use get_content with .iterator() instead."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add a removal version. (Even if we know we might be pushing them out.)

dralley
dralley previously approved these changes Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants