Replicate does not refresh cached api specs.

Open
#6,549 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with pulpcore.app.tasks.replica.replicate_distributions and follow the call into pulpcore.app.replica.upstream_distributions, then inspect the pulp_glue common context and openapi calls shown in the trace. Reproduce the labeled-policy replication with the supplied q_select value and verify that replication completes without the unavailable-parameter error.

Written by the indexing model from the issue text.

Description

Issue

Summary

I am performing a replication using an upstream pulp with the pulp_label_select option enabled. I also have the policy set as labeled. I am getting this error about the URL parameters.

Steps to reproduce

Initialize an upstream definition like so:

  {
    "pulp_href": "/pulp/api/v3/upstream-pulps/01969319-e8df-7ed6-93bc-768aa9742e6a/",
    "prn": "prn:core.upstreampulp:01969319-e8df-7ed6-93bc-768aa9742e6a",
    "pulp_created": "2025-05-02T22:24:30.945414Z",
    "pulp_last_updated": "2025-05-02T22:24:30.945457Z",
    "name": "repo01-adp",
    "base_url": "https://repo.company.com",
    "api_root": "/pulp/",
    "domain": null,
    "ca_cert": null,
    "client_cert": null,
    "tls_validation": false,
    "hidden_fields": [
      {
        "name": "client_key",
        "is_set": false
      },
      {
        "name": "username",
        "is_set": true
      },
      {
        "name": "password",
        "is_set": true
      }
    ],
    "q_select": "pulp_label_select='content_type=adp-common,content_type=adp-platform,content_type=adp-core'",
    "last_replication": null,
    "policy": "labeled"
  },

Expected behavior

replicate should initiate and complete successfully

Stacktrace/Error log

May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]: pulp [849cbddb64804f81980787c20f339f52]: pulpcore.tasking.tasks:INFO: Task[pulpcore.app.tasks.replica.replicate_distributions] 0196931a-0885-73e4-a7e6-9f823cb3b82a failed (OpenAPIError: Parameter [q] not available for distributions_container_container_list.) in domain: default
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]: pulp [849cbddb64804f81980787c20f339f52]: pulpcore.tasking.tasks:INFO:   File "/usr/local/lib/python3.9/site-packages/pulpcore/tasking/tasks.py", line 71, in _execute_task
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:     result = func(*args, **kwargs)
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:   File "/usr/local/lib/python3.9/site-packages/pulpcore/app/tasks/replica.py", line 83, in replicate_distributions
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:     for distro in distros:
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:   File "/usr/local/lib/python3.9/site-packages/pulpcore/app/replica.py", line 96, in upstream_distributions
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:     distributions = self.distribution_ctx_cls(self.pulp_ctx).list(list_size, offset, params)
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:   File "/usr/local/lib/python3.9/site-packages/pulp_glue/common/context.py", line 909, in list
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:     entities.append(next(iterator))
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:   File "/usr/local/lib/python3.9/site-packages/pulp_glue/common/context.py", line 880, in list_iterator
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:     response: t.Mapping[str, t.Any] = self.call("list", parameters=payload)
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:   File "/usr/local/lib/python3.9/site-packages/pulp_glue/common/context.py", line 680, in call
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:     return self.pulp_ctx.call(
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:   File "/usr/local/lib/python3.9/site-packages/pulp_glue/common/context.py", line 450, in call
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:     result = self.api.call(
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:   File "/usr/local/lib/python3.9/site-packages/pulp_glue/common/openapi.py", line 617, in call
May  2 17:24:39 172.18.0.1 docker-pulp_worker-1[58721]:     raise OpenAPIError(

Pulp and pulp-cli version info

pulp core: 3.75.2
pulp-cli: 0.32.1
pulp-glue: 0.32.1

Additonal context

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

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.

More from pulp/pulpcore

All issues in pulp/pulpcore

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.