-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Reporting] Change response behavior for internal Download API (#189588)
## Summary Closes #183846 ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Test the UI in Stack Management > Reporting for jobs that are pending and failed. * To cause a report job to fail, restart the Kibana server during report execution ### Release Note Changed internal APIs for generating reports to return 200 response for pending report jobs and failed report jobs. If this impacts your workflow, please switch to using public APIs for generating reports: https://www.elastic.co/guide/en/kibana/current/automating-report-generation.html#use-a-script
- Loading branch information
Showing
11 changed files
with
282 additions
and
155 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
x-pack/plugins/reporting/server/routes/common/jobs/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export const STATUS_CODES = { | ||
COMPLETED: 200, | ||
PENDING: { | ||
INTERNAL: 202, | ||
PUBLIC: 503, | ||
}, | ||
FAILED: { | ||
INTERNAL: 202, | ||
PUBLIC: 500, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.