[Response Ops][Reporting] Get next run time from task instance in scheduled report list API#233912
Conversation
60dce2f to
819f092
Compare
|
Pinging @elastic/response-ops (Team:ResponseOps) |
js-jankisalvi
left a comment
There was a problem hiding this comment.
Verified locally for scheduled with now and with future date, both show correct next run date 👍
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
cc @ymao1 |
…eduled report list API (elastic#233912) Resolves elastic#228059 ## Summary Currently, the `list` API for scheduled reports dynamically calculates the next run time using the current time and the task rrule schedule. Sometimes that can lead to discrepancies in the next run that's shown vs the actual next run date. This PR updates the API to perform a `bulkGet` on the task instance and use the actual `runAt` time as the next run time. This should fallback to using the dynamic calculation if there are any errors getting the task instance. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…eduled report list API (elastic#233912) Resolves elastic#228059 ## Summary Currently, the `list` API for scheduled reports dynamically calculates the next run time using the current time and the task rrule schedule. Sometimes that can lead to discrepancies in the next run that's shown vs the actual next run date. This PR updates the API to perform a `bulkGet` on the task instance and use the actual `runAt` time as the next run time. This should fallback to using the dynamic calculation if there are any errors getting the task instance. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…eduled report list API (elastic#233912) Resolves elastic#228059 ## Summary Currently, the `list` API for scheduled reports dynamically calculates the next run time using the current time and the task rrule schedule. Sometimes that can lead to discrepancies in the next run that's shown vs the actual next run date. This PR updates the API to perform a `bulkGet` on the task instance and use the actual `runAt` time as the next run time. This should fallback to using the dynamic calculation if there are any errors getting the task instance. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
|
Starting backport for target branches: 8.19, 9.1, 9.2 https://github.com/elastic/kibana/actions/runs/20781404361 |
|
Starting backport for target branches: 8.19, 9.1, 9.2 https://github.com/elastic/kibana/actions/runs/20781404376 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
1 similar comment
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…eduled report list API (elastic#233912) Resolves elastic#228059 ## Summary Currently, the `list` API for scheduled reports dynamically calculates the next run time using the current time and the task rrule schedule. Sometimes that can lead to discrepancies in the next run that's shown vs the actual next run date. This PR updates the API to perform a `bulkGet` on the task instance and use the actual `runAt` time as the next run time. This should fallback to using the dynamic calculation if there are any errors getting the task instance. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 0eaccf8) # Conflicts: # x-pack/platform/plugins/private/reporting/server/routes/common/scheduled/scheduled_query.test.ts # x-pack/platform/plugins/private/reporting/server/routes/common/scheduled/scheduled_query.ts
…eduled report list API (elastic#233912) Resolves elastic#228059 ## Summary Currently, the `list` API for scheduled reports dynamically calculates the next run time using the current time and the task rrule schedule. Sometimes that can lead to discrepancies in the next run that's shown vs the actual next run date. This PR updates the API to perform a `bulkGet` on the task instance and use the actual `runAt` time as the next run time. This should fallback to using the dynamic calculation if there are any errors getting the task instance. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 0eaccf8) # Conflicts: # x-pack/platform/plugins/private/reporting/server/routes/common/scheduled/scheduled_query.test.ts # x-pack/platform/plugins/private/reporting/server/routes/common/scheduled/scheduled_query.ts
…in scheduled report list API (#233912) (#248074) # Backport This will backport the following commits from `main` to `9.1`: - [[Response Ops][Reporting] Get next run time from task instance in scheduled report list API (#233912)](#233912) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ying Mao","email":"ying.mao@elastic.co"},"sourceCommit":{"committedDate":"2025-09-05T15:49:34Z","message":"[Response Ops][Reporting] Get next run time from task instance in scheduled report list API (#233912)\n\nResolves https://github.com/elastic/kibana/issues/228059\n\n## Summary\n\nCurrently, the `list` API for scheduled reports dynamically calculates\nthe next run time using the current time and the task rrule schedule.\nSometimes that can lead to discrepancies in the next run that's shown vs\nthe actual next run date. This PR updates the API to perform a `bulkGet`\non the task instance and use the actual `runAt` time as the next run\ntime. This should fallback to using the dynamic calculation if there are\nany errors getting the task instance.\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"0eaccf862717e077a50f1b6f1d594d84e47e015a","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Reporting:Framework","backport:version","v9.2.0","v9.4.0","v9.1.10","v8.19.10"],"title":"[Response Ops][Reporting] Get next run time from task instance in scheduled report list API","number":233912,"url":"https://github.com/elastic/kibana/pull/233912","mergeCommit":{"message":"[Response Ops][Reporting] Get next run time from task instance in scheduled report list API (#233912)\n\nResolves https://github.com/elastic/kibana/issues/228059\n\n## Summary\n\nCurrently, the `list` API for scheduled reports dynamically calculates\nthe next run time using the current time and the task rrule schedule.\nSometimes that can lead to discrepancies in the next run that's shown vs\nthe actual next run date. This PR updates the API to perform a `bulkGet`\non the task instance and use the actual `runAt` time as the next run\ntime. This should fallback to using the dynamic calculation if there are\nany errors getting the task instance.\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"0eaccf862717e077a50f1b6f1d594d84e47e015a"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/233912","number":233912,"mergeCommit":{"message":"[Response Ops][Reporting] Get next run time from task instance in scheduled report list API (#233912)\n\nResolves https://github.com/elastic/kibana/issues/228059\n\n## Summary\n\nCurrently, the `list` API for scheduled reports dynamically calculates\nthe next run time using the current time and the task rrule schedule.\nSometimes that can lead to discrepancies in the next run that's shown vs\nthe actual next run date. This PR updates the API to perform a `bulkGet`\non the task instance and use the actual `runAt` time as the next run\ntime. This should fallback to using the dynamic calculation if there are\nany errors getting the task instance.\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"0eaccf862717e077a50f1b6f1d594d84e47e015a"}},{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.10","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.10","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
… in scheduled report list API (#233912) (#248075) # Backport This will backport the following commits from `main` to `8.19`: - [[Response Ops][Reporting] Get next run time from task instance in scheduled report list API (#233912)](#233912) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ying Mao","email":"ying.mao@elastic.co"},"sourceCommit":{"committedDate":"2025-09-05T15:49:34Z","message":"[Response Ops][Reporting] Get next run time from task instance in scheduled report list API (#233912)\n\nResolves https://github.com/elastic/kibana/issues/228059\n\n## Summary\n\nCurrently, the `list` API for scheduled reports dynamically calculates\nthe next run time using the current time and the task rrule schedule.\nSometimes that can lead to discrepancies in the next run that's shown vs\nthe actual next run date. This PR updates the API to perform a `bulkGet`\non the task instance and use the actual `runAt` time as the next run\ntime. This should fallback to using the dynamic calculation if there are\nany errors getting the task instance.\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"0eaccf862717e077a50f1b6f1d594d84e47e015a","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Reporting:Framework","backport:version","v9.2.0","v9.4.0","v9.1.10","v8.19.10"],"title":"[Response Ops][Reporting] Get next run time from task instance in scheduled report list API","number":233912,"url":"https://github.com/elastic/kibana/pull/233912","mergeCommit":{"message":"[Response Ops][Reporting] Get next run time from task instance in scheduled report list API (#233912)\n\nResolves https://github.com/elastic/kibana/issues/228059\n\n## Summary\n\nCurrently, the `list` API for scheduled reports dynamically calculates\nthe next run time using the current time and the task rrule schedule.\nSometimes that can lead to discrepancies in the next run that's shown vs\nthe actual next run date. This PR updates the API to perform a `bulkGet`\non the task instance and use the actual `runAt` time as the next run\ntime. This should fallback to using the dynamic calculation if there are\nany errors getting the task instance.\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"0eaccf862717e077a50f1b6f1d594d84e47e015a"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/233912","number":233912,"mergeCommit":{"message":"[Response Ops][Reporting] Get next run time from task instance in scheduled report list API (#233912)\n\nResolves https://github.com/elastic/kibana/issues/228059\n\n## Summary\n\nCurrently, the `list` API for scheduled reports dynamically calculates\nthe next run time using the current time and the task rrule schedule.\nSometimes that can lead to discrepancies in the next run that's shown vs\nthe actual next run date. This PR updates the API to perform a `bulkGet`\non the task instance and use the actual `runAt` time as the next run\ntime. This should fallback to using the dynamic calculation if there are\nany errors getting the task instance.\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"0eaccf862717e077a50f1b6f1d594d84e47e015a"}},{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.10","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.10","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Resolves #228059
Summary
Currently, the
listAPI for scheduled reports dynamically calculates the next run time using the current time and the task rrule schedule. Sometimes that can lead to discrepancies in the next run that's shown vs the actual next run date. This PR updates the API to perform abulkGeton the task instance and use the actualrunAttime as the next run time. This should fallback to using the dynamic calculation if there are any errors getting the task instance.