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

fix(api): Fix location header for archived report generation #775

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

Josh-Matsuoka
Copy link
Contributor

@Josh-Matsuoka Josh-Matsuoka commented Jan 14, 2025

Fixes #762

Hi,

This addresses #762 . The location header that was returned with the request when the cache missed and the report needed to be generated was incorrect, this caused the following sequence of events to happen:

  • Client sends report generation request
  • Server sees that the report isn't in the cache, kicks off report generation and tries to return an intermediate response to the client
  • Location Header on the last step was incorrect causing an exception which returned a 400 to the client despite report generation proceeding as expected.
  • Subsequent requests succeeded because at that point the report was cached.

This fixes the location header and adds a missing content type header to active report generation.

@Josh-Matsuoka
Copy link
Contributor Author

/build_test

Copy link

Workflow started at 1/14/2025, 11:44:44 AM. View Actions Run.

Copy link

No OpenAPI schema changes detected.

Copy link

No GraphQL schema changes detected.

Copy link

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat/actions/runs/12772345679

@andrewazores
Copy link
Member

Could you add some cases to ReportsTest.java to add assertions about these headers?

@andrewazores
Copy link
Member

/build_test

Copy link

Workflow started at 1/14/2025, 1:40:50 PM. View Actions Run.

Copy link

No GraphQL schema changes detected.

Copy link

No OpenAPI schema changes detected.

Copy link

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat/actions/runs/12774254006

@andrewazores andrewazores merged commit f371a03 into cryostatio:main Jan 14, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Report generation fails for archived recording
2 participants