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

[Reporting] For internal APIs, do not use 503/500 codes in the Report Download API #183846

Closed
tsullivan opened this issue May 20, 2024 · 1 comment · Fixed by #189588
Closed
Assignees
Labels
Feature:Reporting:Framework Reporting issues pertaining to the overall framework Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)

Comments

@tsullivan
Copy link
Member

tsullivan commented May 20, 2024

Refer to the TODO comment in the Reporting code here.

The "download report" endpoint is built to return a custom HTTP status code of 503 or 500 in cases where the report job has not successfully completed.

  • 503: Report job is processing but not yet complete
  • 500: Report job has failed and execution retries have exhausted.

This functionality is intended only for the "public" download report API, where it's instrumental in helping Watcher and custom scripts automate reports.

Requirements:
For the "internal" download report API, we need a different semantic mechanism to tell the client that the report is not ready for download, or can't be downloaded. The solution should use a response payload body and the HTTP response code should always be 200 to indicate an OK response..

This solution will alleviate error codes that come up in monitoring of serverless projects.

@tsullivan tsullivan added the Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) label May 20, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

tsullivan added a commit that referenced this issue May 20, 2024
…codes (#183852)

## Summary

These logs help correlate errors one may see from investigating HTTP 5xx
status codes that are sent in response to the Download Report API.

Related to: #183846
@tsullivan tsullivan added the Feature:Reporting:Framework Reporting issues pertaining to the overall framework label Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Reporting:Framework Reporting issues pertaining to the overall framework Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants