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

Replay cancel scheduled cleared reruns #283

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

Mryashbhardwaj
Copy link
Member

@Mryashbhardwaj Mryashbhardwaj commented Oct 18, 2024

  • replay should not cancel non replay managed runs
  • also cancel cleared runs(one's that were originally scheduled but cleared by replay)

@@ -235,15 +234,17 @@ func (r *ReplayService) cancelReplayRuns(ctx context.Context, replayWithRun *sch
return err
}

syncedRunStatus, err := r.executor.SyncStatus(ctx, replayWithRun, jobCron)
jobRunsRunsWithDetails, err := r.executor.FetchRunsWithDetails(ctx, replay, jobCron)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo RunsRuns?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

logicalTime := run.GetLogicalTime(jobCron)
runState := scheduler.JobRunStatus{
ScheduledAt: run.ScheduledAt,
State: run.State,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's verify whether the canceled runs will still have the origin state or the updated ones. I believe we are expecting canceled status?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah you are right this should be scheduler.StateCanceled

@Mryashbhardwaj Mryashbhardwaj merged commit b52a9f1 into main Oct 21, 2024
3 checks passed
@Mryashbhardwaj Mryashbhardwaj deleted the replay_cancel_scheduled_reruns branch October 21, 2024 09:35
deryrahman pushed a commit that referenced this pull request Oct 23, 2024
* fix: replay do not cancel non replay managed runs, also cancel cleared runs(one's that were originally scheduled but cleared by replay)

* fix: typos and add logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants