-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Add warning logs about CSV export type being deprecated #104025
[Reporting] Add warning logs about CSV export type being deprecated #104025
Conversation
@@ -87,6 +87,7 @@ export function jobsQueryFactory(reportingCore: ReportingCore) { | |||
elasticsearchClient.search({ body, index: getIndex() }) | |||
); | |||
|
|||
// FIXME: return the info in ReportApiJSON format; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing became clear from updating the API functional tests, the data formats of the Reporting endpoints are inconsistent.
- "generate" API: returns
ReportApiJSON
- "list" API: returns
ReportDocument[]
- "info" API: returns
ReportSource
To make it consistent, all the APIs should return ReportApiJSON
format.
The comments are added to this file, which is responsible for handling API requests that query jobs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the FIXMEs are being handled in the next PR: #102833
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
Pinging @elastic/kibana-app-services (Team:AppServices) |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great @tsullivan !
I did not test this locally, but your functional test coverage looks very comprehensive.
Later, this flag will be used in the Management UI to highlight the reports that were created with a deprecated export type.
Do we have Jira ticket/GH issue for tracking this?
@@ -20,6 +20,9 @@ export const createJobFnFactory: CreateJobFnFactory< | |||
const crypto = cryptoFactory(config.get('encryptionKey')); | |||
|
|||
return async function createJob(jobParams, context, request) { | |||
logger.warn( | |||
`The "/generate/csv" endpoint is deprecated and will be removed in Kibana 8.0. Please recreate the POST URL used to automate this CSV export.` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: perhaps we could rephrase this as:
This CSV export is deprecated and will be removed in Kibana 8.0. Please recreate the POST URL to continue generating this CSV export. See <docs link with screenshots>.
My concern with the current version is that mentioning an endpoint /generate/csv
is a bit too implementation-level detail. WDYT?
Additionally, I think we should wrap this in i18n.translate
.
If we can link them to somewhere in the docs that would be A+, but this can definitely be addressed in a follow up PR if you agree!
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
…lastic#104025) * add deprecation logging to csv export type * fix payload.isDeprecated Co-authored-by: Kibana Machine <[email protected]>
…104025) (#104528) * add deprecation logging to csv export type * fix payload.isDeprecated Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
…lastic#104025) * add deprecation logging to csv export type * fix payload.isDeprecated Co-authored-by: Kibana Machine <[email protected]>
Summary
Needed for: #102833
Users may have set up automated CSV reports in Kibana 7.12 or below, which is before the export type was replaced (
csv_searchsource
) in 7.13. To help the user be aware of an upcoming breaking change, this PR logs a warning to ask the user to re generates the POST URL string that is needed for the automation.A new flag can be added to the
payload
object of the stored job parameters,isDeprecated
. This flag exists for testability right now. Later, this flag will be used in the Management UI to highlight the reports that were created with a deprecated export type.How to test
See the "How to test" section at #102833
Checklist
For maintainers
Release note
Added warning logging in Kibana Reporting to inform that a deprecated export type is used, and that report automation needs to be updated for future compatibility.