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

--retain-repo-versions 1 causes "KeyError: 'repositories_partial_update'" #529

Closed
abotelho-cbn opened this issue Jul 14, 2022 · 3 comments · Fixed by #530
Closed

--retain-repo-versions 1 causes "KeyError: 'repositories_partial_update'" #529

abotelho-cbn opened this issue Jul 14, 2022 · 3 comments · Fixed by #530
Milestone

Comments

@abotelho-cbn
Copy link

pulp1:~ # pulp status { "versions": [ { "component": "core", "version": "3.19.0" }, { "component": "rpm", "version": "3.17.5" }, { "component": "python", "version": "3.6.0" }, { "component": "maven", "version": "0.3.2" }, { "component": "file", "version": "1.10.2" }, { "component": "deb", "version": "2.18.0" }, { "component": "container", "version": "2.12.1" }, { "component": "certguard", "version": "1.5.2" }, { "component": "ansible", "version": "0.13.0" } ], "online_workers": [ { "pulp_href": "/pulp/api/v3/workers/ca711299-1972-48b6-a2bb-67dc8b34a178/", "pulp_created": "2022-06-14T22:32:42.226535Z", "name": "15412@ef994fae625f", "last_heartbeat": "2022-07-14T17:06:51.355585Z", "current_task": null }, { "pulp_href": "/pulp/api/v3/workers/a4487e9d-df4f-46ed-b67c-bd84a49ee201/", "pulp_created": "2022-06-14T22:32:40.944313Z", "name": "15409@ef994fae625f", "last_heartbeat": "2022-07-14T17:07:01.292294Z", "current_task": null } ], "online_content_apps": [ { "name": "15469@ef994fae625f", "last_heartbeat": "2022-07-14T17:06:55.821491Z" }, { "name": "15468@ef994fae625f", "last_heartbeat": "2022-07-14T17:06:59.581073Z" } ], "database_connection": { "connected": true }, "redis_connection": { "connected": false }, "storage": { "total": 660019150848, "used": 180677230592, "free": 451386941440 } }

pulp1:~ # pulp shell Starting Pulp3 interactive shell... pulp> deb repository update --name debian12 --retain-repo-versions 1 KeyError: 'repositories_partial_update'

pulp1:~ # pulp deb repository update --name debian12 --retain-repo-versions 1 Traceback (most recent call last): File "/usr/bin/pulp", line 11, in <module> load_entry_point('pulp-cli==0.14.0', 'console_scripts', 'pulp')() File "/usr/lib/python3.8/site-packages/click/core.py", line 1128, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3.8/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/lib/python3.8/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3.8/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3.8/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3.8/site-packages/pulpcore/cli/common/generic.py", line 50, in invoke return super().invoke(ctx) File "/usr/lib/python3.8/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3.8/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/lib/python3.8/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/usr/lib/python3.8/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/lib/python3.8/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/usr/lib/python3.8/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/lib/python3.8/site-packages/pulpcore/cli/common/generic.py", line 802, in callback entity_ctx.update(href=entity_ctx.pulp_href, body=body) File "/usr/lib/python3.8/site-packages/pulpcore/cli/common/context.py", line 525, in update return self.call( File "/usr/lib/python3.8/site-packages/pulpcore/cli/common/context.py", line 431, in call return self.pulp_ctx.call( File "/usr/lib/python3.8/site-packages/pulpcore/cli/common/context.py", line 148, in call result = self.api.call(operation_id, parameters=parameters, body=body, uploads=uploads) File "/usr/lib/python3.8/site-packages/pulpcore/cli/common/openapi.py", line 239, in call method, path = self.operations[operation_id] KeyError: 'repositories_partial_update'

API works:
curl --request PUT \ --url https://example.com/pulp/api/v3/repositories/deb/apt/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/ \ --header 'Authorization: Basic <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "debian12", "retain_repo_versions": 1 }'

@mdellweg
Copy link
Member

I think this can be solved in pulp-cli, where some heuristics for a workaround broke. Transferring the ticket now.

@mdellweg mdellweg transferred this issue from pulp/pulp-cli-deb Jul 15, 2022
@mdellweg
Copy link
Member

In the meantime, you can probably install pulp-cli 0.13 to make it work again.

mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jul 15, 2022
Adding ID_PREFIX to the base context models broke the heuristics of the
workaround in place for translating PARTIAL_UPDATE_ID into UPDATE_ID.

fixes pulp#529
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jul 15, 2022
Adding ID_PREFIX to the base context models broke the heuristics of the
workaround in place for translating PARTIAL_UPDATE_ID into UPDATE_ID.

fixes pulp#529
mdellweg added a commit that referenced this issue Jul 15, 2022
Adding ID_PREFIX to the base context models broke the heuristics of the
workaround in place for translating PARTIAL_UPDATE_ID into UPDATE_ID.

fixes #529
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jul 15, 2022
Adding ID_PREFIX to the base context models broke the heuristics of the
workaround in place for translating PARTIAL_UPDATE_ID into UPDATE_ID.

fixes pulp#529

(cherry picked from commit eabe014)
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jul 15, 2022
Adding ID_PREFIX to the base context models broke the heuristics of the
workaround in place for translating PARTIAL_UPDATE_ID into UPDATE_ID.

fixes pulp#529

(cherry picked from commit eabe014)
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jul 15, 2022
Adding ID_PREFIX to the base context models broke the heuristics of the
workaround in place for translating PARTIAL_UPDATE_ID into UPDATE_ID.

fixes pulp#529

(cherry picked from commit eabe014)
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jul 15, 2022
Adding ID_PREFIX to the base context models broke the heuristics of the
workaround in place for translating PARTIAL_UPDATE_ID into UPDATE_ID.

fixes pulp#529

(cherry picked from commit eabe014)
mdellweg added a commit that referenced this issue Jul 15, 2022
Adding ID_PREFIX to the base context models broke the heuristics of the
workaround in place for translating PARTIAL_UPDATE_ID into UPDATE_ID.

fixes #529

(cherry picked from commit eabe014)
@mdellweg
Copy link
Member

0.14.1 is released

@mdellweg mdellweg added this to the 0.15.0 milestone Jul 17, 2022
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 a pull request may close this issue.

2 participants