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

Auto-refresh api-spec for other than version-changes #820

Open
ggainey opened this issue Nov 3, 2023 · 2 comments
Open

Auto-refresh api-spec for other than version-changes #820

ggainey opened this issue Nov 3, 2023 · 2 comments
Labels
bug Something isn't working (template-set)

Comments

@ggainey
Copy link
Contributor

ggainey commented Nov 3, 2023

Currently we will auto-update api-spec if we notice that the pulp-instance you're pointing at, is running different versions than when last we refreshed the spec.

However - there are other ways for a spec to be invalid. If one instance has domains enabled, for example, and a second one running the same versions does not, their specs will not match.

We should trigger auto-refresh on more than just the version-list.

@ggainey ggainey added bug Something isn't working (template-set) Triage-Needed Needs to be reviewed at next pulp-cli mtg labels Nov 3, 2023
@mdellweg
Copy link
Member

mdellweg commented Nov 3, 2023

To be fair: We cache the api per hostname.
But i still agree this can be improved.

@ggainey ggainey removed the Triage-Needed Needs to be reviewed at next pulp-cli mtg label Jan 17, 2024
@lubosmj
Copy link
Member

lubosmj commented Mar 13, 2024

Got bitten by this after enabling domains, recently. We should definitely trigger the refresh more frequently.

For me, the obvious querying did not work even though my configuration was correct (even after running pulp status which is supposed to clear the cache (?)):

pulp --domain default file distribution list
Error: 
<!doctype html>
<html lang="en">
<head>
  <title>Not Found</title>
</head>
<body>
  <h1>Not Found</h1><p>The requested resource was not found on this server.</p>
</body>
</html>
http :5001/pulp/default/api/v3/distributions/file/file/
{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "base_path": "test",
            "base_url": "http://localhost:5001/pulp/content/default/test/",
            "content_guard": null,
            "hidden": false,
            "name": "test",
            "publication": "/pulp/default/api/v3/publications/file/file/018e393f-81f3-79d3-ace6-6bb161d31eac/",
            "pulp_created": "2024-03-13T19:20:07.067971Z",
            "pulp_href": "/pulp/default/api/v3/distributions/file/file/018e3941-f29a-73dc-ab0a-c85818b9f030/",
            "pulp_labels": {},
            "pulp_last_updated": "2024-03-13T19:20:07.067993Z",
            "repository": null
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (template-set)
Projects
None yet
Development

No branches or pull requests

3 participants