pulp / pulp/pulpcore

Replicate does not work with q_select

Open
#6,762 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue
Dominant language
Python
Stars
598
Forks
168
Avg merge
1d 4h
Merged PRs (30d)
86

Description

Version
core - 3.75.2
rpm - 3.29.1

Describe the bug
Can I get some help using the q_select field on replicate? I have 24 distributions with the label content_year. My upstream definition has "q_select": "pulp_label_select='content_year'". However, when I replicate this upstream, it does not pick up any distributions. What is going on here?

http --verify no get https://localhost:443/pulp/api/v3/distributions/rpm/rpm/?pulp_label_select='content_year' | jq -r '.results[].name' | wc -l
24

When I initialize a replicate, I see two tasks created, replicate distributions and finalize replication. I do not see any new resources created on the downstream instance.

I can see in the upstream logs that its using the same query that I did manually above.

Jul  3 09:46:05 172.19.0.1 docker-pulp_api-1[1438]: ('pulp [b36b886e67644bd785856487d226cfd9]: ::ffff:172.19.0.12 - admin [03/Jul/2025:14:46:05 +0000] "GET /pulp/api/v3/distributions/container/container/?q=pulp_label_select%3D%27content_year%27&offset=0&limit=100 HTTP/1.0" 200 52 "-" "pulpcore/3.75.2 (cpython 3.9.21-final0, Linux x86_64) (pulp-glue 0.32.1)"',)
Jul  3 09:46:06 172.19.0.1 docker-pulp_api-1[1438]: ('pulp [b36b886e67644bd785856487d226cfd9]: 2001:db8:1::c - admin [03/Jul/2025:14:46:06 +0000] "GET /pulp/api/v3/distributions/python/pypi/?q=pulp_label_select%3D%27content_year%27&offset=0&limit=100 HTTP/1.0" 200 52 "-" "pulpcore/3.75.2 (cpython 3.9.21-final0, Linux x86_64) (pulp-glue 0.32.1)"',)
Jul  3 09:46:07 172.19.0.1 docker-pulp_api-1[1438]: ('pulp [b36b886e67644bd785856487d226cfd9]: ::ffff:172.19.0.12 - admin [03/Jul/2025:14:46:07 +0000] "GET /pulp/api/v3/distributions/rpm/rpm/?q=pulp_label_select%3D%27content_year%27&offset=0&limit=100 HTTP/1.0" 200 20169 "-" "pulpcore/3.75.2 (cpython 3.9.21-final0, Linux x86_64) (pulp-glue 0.32.1)"',)
Jul  3 09:46:08 172.19.0.1 docker-pulp_api-1[1438]: ('pulp [b36b886e67644bd785856487d226cfd9]: ::ffff:172.19.0.12 - admin [03/Jul/2025:14:46:08 +0000] "GET /pulp/api/v3/distributions/file/file/?q=pulp_label_select%3D%27content_year%27&offset=0&limit=100 HTTP/1.0" 200 52 "-" "pulpcore/3.75.2 (cpython 3.9.21-final0, Linux x86_64) (pulp-glue 0.32.1)"',)

To Reproduce
Replicate with q_select

Expected behavior
The subset distributions that match the label will be processed.

Additional context
https://matrix.to/#/!HWvLQmBGVPfJfTQBAu:matrix.org/$3jAQchPU8nybDsrDk9Wg1a6vcH1vBSSaEO2YjfSr8gc?via=matrix.org&via=ctrl-c.liu.se&via=fedora.im

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the q_select request against the RPM distribution endpoint and trace the "replicate distributions" and "finalize replication" tasks. Compare the manually returned distributions with the resources selected during replication. Done means distributions matching pulp_label_select='content_year' are processed on the downstream instance.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.