[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule#224948
[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule#224948ymao1 merged 10 commits intoelastic:mainfrom
dtstart in rrule schedule#224948Conversation
34ab1df to
02b780f
Compare
dtstart in rrule schedule
ad71706 to
b24e2c6
Compare
|
Pinging @elastic/response-ops (Team:ResponseOps) |
|
Thanks Ying! I drafted the UI integration with these changes in #225437, I just have some small comments:
I'll review the code too in a minute! 🙂 |
Yes that's correct. Will that be a problem?
I think the original requirement was making the assumption that the user flow would be something like |
| try { | ||
| const dtstart = taskInstance.schedule.rrule.dtstart | ||
| ? new Date(taskInstance.schedule.rrule.dtstart) | ||
| : now; |
There was a problem hiding this comment.
Just to be sure: is now fine even if it's not in the timezone from the rrule?
There was a problem hiding this comment.
I think this is the problem Zach solved, so yeah it is ok.
tzid is used to generate the recurrences with the given day, hour, minute etc.
dtstart is the start date of the recurrences, tzid doesn't affect it.
I tested it with the below config:
rrule: {
freq: 3,
interval: 1,
tzid: 'Europe/Minsk', --> GMT+3
dtstart: '2025-06-27T13:10:10.003Z',
byhour: [19],
byminute: [21],
},
and the calculated nextRun is: 2025-06-27T16:21:10.003Z
| dtstart: now, | ||
| dtstart, | ||
| }); | ||
| return rrule.after(now)?.toISOString() || nowString; |
There was a problem hiding this comment.
This override is not reflected in the dtstart returned in the list API, right?
There was a problem hiding this comment.
Correct, that dtstart should remain fixed
I think the original toggle is to allow a one time scheduled export vs a recurring export. Aka, I would like to schedule a one time export for July 2nd or I would like to schedule the export for July 2nd and all following tuesdays on a weekly bases. |
Gotcha. I don't think we can support that right now. |
ersin-erdal
left a comment
There was a problem hiding this comment.
LGTM
Tested locally, works as expected.
…e schedule - schema changes only for intermediate release (#224979) ## Summary This PR contains the schema changes needed to support using `dtstart` in task manager rrule schedules. This is meant for intermediate release and then the changes will be used in this PR: #224948 Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…e schedule - schema changes only for intermediate release (elastic#224979) ## Summary This PR contains the schema changes needed to support using `dtstart` in task manager rrule schedules. This is meant for intermediate release and then the changes will be used in this PR: elastic#224948 Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit f43138c)
…e schedule - schema changes only for intermediate release (elastic#224979) ## Summary This PR contains the schema changes needed to support using `dtstart` in task manager rrule schedules. This is meant for intermediate release and then the changes will be used in this PR: elastic#224948 Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit f43138c) # Conflicts: # src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts
…n rrule schedule - schema changes only for intermediate release (#224979) (#225645) # Backport This will backport the following commits from `main` to `9.1`: - [[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule - schema changes only for intermediate release (#224979)](#224979) <!--- Backport version: 9.6.6 --> ### 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-06-27T14:05:28Z","message":"[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule - schema changes only for intermediate release (#224979)\n\n## Summary\n\nThis PR contains the schema changes needed to support using `dtstart` in\ntask manager rrule schedules. This is meant for intermediate release and\nthen the changes will be used in this PR:\nhttps://github.com//pull/224948\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"f43138c059047b5a73ea8fabbc976ed2fc09a6b9","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Reporting:Framework","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule - schema changes only for intermediate release","number":224979,"url":"https://github.com/elastic/kibana/pull/224979","mergeCommit":{"message":"[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule - schema changes only for intermediate release (#224979)\n\n## Summary\n\nThis PR contains the schema changes needed to support using `dtstart` in\ntask manager rrule schedules. This is meant for intermediate release and\nthen the changes will be used in this PR:\nhttps://github.com//pull/224948\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"f43138c059047b5a73ea8fabbc976ed2fc09a6b9"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224979","number":224979,"mergeCommit":{"message":"[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule - schema changes only for intermediate release (#224979)\n\n## Summary\n\nThis PR contains the schema changes needed to support using `dtstart` in\ntask manager rrule schedules. This is meant for intermediate release and\nthen the changes will be used in this PR:\nhttps://github.com//pull/224948\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"f43138c059047b5a73ea8fabbc976ed2fc09a6b9"}}]}] BACKPORT--> Co-authored-by: Ying Mao <ying.mao@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…in rrule schedule - schema changes only for intermediate release (#224979) (#225646) # Backport This will backport the following commits from `main` to `8.19`: - [[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule - schema changes only for intermediate release (#224979)](#224979) <!--- Backport version: 10.0.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-06-27T14:05:28Z","message":"[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule - schema changes only for intermediate release (#224979)\n\n## Summary\n\nThis PR contains the schema changes needed to support using `dtstart` in\ntask manager rrule schedules. This is meant for intermediate release and\nthen the changes will be used in this PR:\nhttps://github.com//pull/224948\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"f43138c059047b5a73ea8fabbc976ed2fc09a6b9","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Reporting:Framework","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule - schema changes only for intermediate release","number":224979,"url":"https://github.com/elastic/kibana/pull/224979","mergeCommit":{"message":"[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule - schema changes only for intermediate release (#224979)\n\n## Summary\n\nThis PR contains the schema changes needed to support using `dtstart` in\ntask manager rrule schedules. This is meant for intermediate release and\nthen the changes will be used in this PR:\nhttps://github.com//pull/224948\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"f43138c059047b5a73ea8fabbc976ed2fc09a6b9"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/225645","number":225645,"state":"OPEN"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224979","number":224979,"mergeCommit":{"message":"[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule - schema changes only for intermediate release (#224979)\n\n## Summary\n\nThis PR contains the schema changes needed to support using `dtstart` in\ntask manager rrule schedules. This is meant for intermediate release and\nthen the changes will be used in this PR:\nhttps://github.com//pull/224948\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"f43138c059047b5a73ea8fabbc976ed2fc09a6b9"}}]}] BACKPORT-->
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
cc @ymao1 |
|
Starting backport for target branches: 8.19, 9.1 https://github.com/elastic/kibana/actions/runs/16003724040 |
…ule schedule (elastic#224948) ## Summary - Updates task manager `rrule` schedule to allow for specifying an optional `dtstart` date time. Task manager will use this to calculate the first `runAt` for a recurring task (if defined). Each subsequent `runAt` will continue to be calculated based on the previous `runAt` time. - Updates scheduled reporting API to use this ability. Intermediate release PR for schema changes only: https://github.com/elastic/kibana/pull/224979/files --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 29d2103)
…ule schedule (elastic#224948) ## Summary - Updates task manager `rrule` schedule to allow for specifying an optional `dtstart` date time. Task manager will use this to calculate the first `runAt` for a recurring task (if defined). Each subsequent `runAt` will continue to be calculated based on the previous `runAt` time. - Updates scheduled reporting API to use this ability. Intermediate release PR for schema changes only: https://github.com/elastic/kibana/pull/224979/files --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 29d2103)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… in rrule schedule (#224948) (#226047) # Backport This will backport the following commits from `main` to `9.1`: - [[Response Ops][Reporting][Task Manager] Allow setting `dtstart` in rrule schedule (#224948)](#224948) <!--- Backport version: 9.6.6 --> ### 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-07-01T15:31:44Z","message":"[Response Ops][Reporting][Task Manager] Allow setting `dtstart` in rrule schedule (#224948)\n\n## Summary\n\n- Updates task manager `rrule` schedule to allow for specifying an\noptional `dtstart` date time. Task manager will use this to calculate\nthe first `runAt` for a recurring task (if defined). Each subsequent\n`runAt` will continue to be calculated based on the previous `runAt`\ntime.\n- Updates scheduled reporting API to use this ability.\n\nIntermediate release PR for schema changes only:\nhttps://github.com//pull/224979/files\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"29d210323cb4e15eb2c4b693eeeb8fbbf3d1324f","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Reporting:Framework","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Response Ops][Reporting][Task Manager] Allow setting `dtstart` in rrule schedule","number":224948,"url":"https://github.com/elastic/kibana/pull/224948","mergeCommit":{"message":"[Response Ops][Reporting][Task Manager] Allow setting `dtstart` in rrule schedule (#224948)\n\n## Summary\n\n- Updates task manager `rrule` schedule to allow for specifying an\noptional `dtstart` date time. Task manager will use this to calculate\nthe first `runAt` for a recurring task (if defined). Each subsequent\n`runAt` will continue to be calculated based on the previous `runAt`\ntime.\n- Updates scheduled reporting API to use this ability.\n\nIntermediate release PR for schema changes only:\nhttps://github.com//pull/224979/files\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"29d210323cb4e15eb2c4b693eeeb8fbbf3d1324f"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224948","number":224948,"mergeCommit":{"message":"[Response Ops][Reporting][Task Manager] Allow setting `dtstart` in rrule schedule (#224948)\n\n## Summary\n\n- Updates task manager `rrule` schedule to allow for specifying an\noptional `dtstart` date time. Task manager will use this to calculate\nthe first `runAt` for a recurring task (if defined). Each subsequent\n`runAt` will continue to be calculated based on the previous `runAt`\ntime.\n- Updates scheduled reporting API to use this ability.\n\nIntermediate release PR for schema changes only:\nhttps://github.com//pull/224979/files\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"29d210323cb4e15eb2c4b693eeeb8fbbf3d1324f"}}]}] BACKPORT--> Co-authored-by: Ying Mao <ying.mao@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…` in rrule schedule (#224948) (#226046) # Backport This will backport the following commits from `main` to `8.19`: - [[Response Ops][Reporting][Task Manager] Allow setting `dtstart` in rrule schedule (#224948)](#224948) <!--- Backport version: 9.6.6 --> ### 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-07-01T15:31:44Z","message":"[Response Ops][Reporting][Task Manager] Allow setting `dtstart` in rrule schedule (#224948)\n\n## Summary\n\n- Updates task manager `rrule` schedule to allow for specifying an\noptional `dtstart` date time. Task manager will use this to calculate\nthe first `runAt` for a recurring task (if defined). Each subsequent\n`runAt` will continue to be calculated based on the previous `runAt`\ntime.\n- Updates scheduled reporting API to use this ability.\n\nIntermediate release PR for schema changes only:\nhttps://github.com//pull/224979/files\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"29d210323cb4e15eb2c4b693eeeb8fbbf3d1324f","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Reporting:Framework","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Response Ops][Reporting][Task Manager] Allow setting `dtstart` in rrule schedule","number":224948,"url":"https://github.com/elastic/kibana/pull/224948","mergeCommit":{"message":"[Response Ops][Reporting][Task Manager] Allow setting `dtstart` in rrule schedule (#224948)\n\n## Summary\n\n- Updates task manager `rrule` schedule to allow for specifying an\noptional `dtstart` date time. Task manager will use this to calculate\nthe first `runAt` for a recurring task (if defined). Each subsequent\n`runAt` will continue to be calculated based on the previous `runAt`\ntime.\n- Updates scheduled reporting API to use this ability.\n\nIntermediate release PR for schema changes only:\nhttps://github.com//pull/224979/files\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"29d210323cb4e15eb2c4b693eeeb8fbbf3d1324f"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224948","number":224948,"mergeCommit":{"message":"[Response Ops][Reporting][Task Manager] Allow setting `dtstart` in rrule schedule (#224948)\n\n## Summary\n\n- Updates task manager `rrule` schedule to allow for specifying an\noptional `dtstart` date time. Task manager will use this to calculate\nthe first `runAt` for a recurring task (if defined). Each subsequent\n`runAt` will continue to be calculated based on the previous `runAt`\ntime.\n- Updates scheduled reporting API to use this ability.\n\nIntermediate release PR for schema changes only:\nhttps://github.com//pull/224979/files\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"29d210323cb4e15eb2c4b693eeeb8fbbf3d1324f"}}]}] BACKPORT--> Co-authored-by: Ying Mao <ying.mao@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…ule schedule (elastic#224948) ## Summary - Updates task manager `rrule` schedule to allow for specifying an optional `dtstart` date time. Task manager will use this to calculate the first `runAt` for a recurring task (if defined). Each subsequent `runAt` will continue to be calculated based on the previous `runAt` time. - Updates scheduled reporting API to use this ability. Intermediate release PR for schema changes only: https://github.com/elastic/kibana/pull/224979/files --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
rruleschedule to allow for specifying an optionaldtstartdate time. Task manager will use this to calculate the firstrunAtfor a recurring task (if defined). Each subsequentrunAtwill continue to be calculated based on the previousrunAttime.Intermediate release PR for schema changes only: https://github.com/elastic/kibana/pull/224979/files