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

Requests to /api/insights/v1/system/<uuid>/reports lack trailing slash #895

Open
PaulWay opened this issue Aug 20, 2024 · 2 comments
Open

Comments

@PaulWay
Copy link
Contributor

PaulWay commented Aug 20, 2024

At the moment the Foreman client seems to be making requests on behalf of the Insights client to:

/api/insights/v1/system/<uuid>/reports?branch_id=<branch_id>.

This lacks a trailing slash, which causes the API to return a 301 redirect to:

/api/insights/v1/system/<uuid>/reports/?branch_id=<branch_id>.

Which the client immediately follows. This causes two requests and two jobs to process one request, leading to increased work and delays in both Satellite and the Insights Advisor API.

We would like to make sure that only the latter URL is requested.

Versions affected:

Satellite 6.11.5.6, 6.11.5.7, 6.12.5.3, 6.13.1, 6.13.7, 6.14.2, 6.14.4, 6.14.4.1, 6.15.1, 6.15.2
foreman_rh_cloud 5.0.46, 6.0.45, 7.0.45, 7.0.48, 8.0.51, 9.0.56
insights-client 3.1.9, 3.2.2

@ShimShtein
Copy link
Member

Also tracked in https://issues.redhat.com/browse/SAT-27374

@PaulWay
Copy link
Contributor Author

PaulWay commented Aug 21, 2024

I'm happy to submit a patch or PR for this, I'm just struggling to see where this URL is constructed or comes from.

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

No branches or pull requests

2 participants