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

Remove customized operation_id from OrphansView #882

Merged
merged 1 commit into from
Sep 2, 2020
Merged

Conversation

fao89
Copy link
Member

@fao89 fao89 commented Sep 2, 2020

https://pulp.plan.io/issues/7446
closes #7446

Please be sure you have read our documentation on creating PRs:
https://docs.pulpproject.org/contributing/pull-request-walkthrough.html

@pulpbot
Copy link
Member

pulpbot commented Sep 2, 2020

Attached issue: https://pulp.plan.io/issues/7446

@mdellweg
Copy link
Member

mdellweg commented Sep 2, 2020

Does this result in a change of of the api.json? If yes, can you outline how?

@fao89
Copy link
Member Author

fao89 commented Sep 2, 2020

Does this result in a change of of the api.json? If yes, can you outline how?

From:

"/pulp/api/v3/orphans/": {
"delete": {
"operationId": "orphans_delete",
"description": "Trigger an asynchronous task that deletes allorphaned content and artifacts.",
"summary": "Delete orphans",
"tags": [
"Orphans"
],

to

"/pulp/api/v3/orphans/": {
"delete": {
"operationId": "delete",
"description": "Trigger an asynchronous task that deletes allorphaned content and artifacts.",
"summary": "Delete orphans",
"tags": [
"Orphans"
],

@mdellweg
Copy link
Member

mdellweg commented Sep 2, 2020

Than it is breaking the way we are consuming the api.

Atm, it falls in line with all the other operationId's:
look at cat api.json | jq '.paths[][]|.operationId'

Sorry i need to NACK this.

@fao89
Copy link
Member Author

fao89 commented Sep 2, 2020

Than it is breaking the way we are consuming the api.

Atm, it falls in line with all the other operationId's:
look at cat api.json | jq '.paths[][]|.operationId'

Sorry i need to NACK this.

(pulp) [vagrant@pulp3-source-fedora31 html]$ curl -o api.json "http://localhost:24817/pulp/api/v3/docs/api.json"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  940k  100  940k    0     0  1827k      0 --:--:-- --:--:-- --:--:-- 1827k
(pulp) [vagrant@pulp3-source-fedora31 html]$ cat api.json | jq '.paths[][]|.operationId' | grep orphan
"pulp_api_v3_orphans_delete"

Comment on lines +58 to +59
path = "/".join(tokenized_path).replace("pulp/api/v3/", "")
tokenized_path = path.split("/")
Copy link
Member Author

Choose a reason for hiding this comment

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

Now I fixed what you meant @mdellweg

(pulp) [vagrant@pulp3-source-fedora31 html]$ curl -o api.json "http://localhost:24817/pulp/api/v3/docs/api.json"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  940k  100  940k    0     0  2229k      0 --:--:-- --:--:-- --:--:-- 2224k
(pulp) [vagrant@pulp3-source-fedora31 html]$ cat api.json | jq '.paths[][]|.operationId' | grep orphan
"orphans_delete"

Copy link
Member

Choose a reason for hiding this comment

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

That looks much better.

@fao89 fao89 force-pushed the 7446 branch 2 times, most recently from a52dddc to 3908276 Compare September 2, 2020 16:49
def delete_orphans():
"""Delete orphans through bindings."""
response = OrphansApi(core_client).delete()
monitor_task(response.task)
Copy link
Member Author

Choose a reason for hiding this comment

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

@dkliban this was the fix for the S3 issue

@dkliban dkliban merged commit 98c591a into pulp:master Sep 2, 2020
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 this pull request may close these issues.

None yet

4 participants