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

Cancel a Scheduling Run #1251

Merged
merged 6 commits into from
Dec 7, 2023
Merged

Cancel a Scheduling Run #1251

merged 6 commits into from
Dec 7, 2023

Conversation

Mythicaeda
Copy link
Contributor

Description

Allows for a scheduling run to be canceled.

Scheduling will check if it has been canceled:

  • before computing simulation results
  • before processing a batch in simulation
  • before initializing the plan
  • at the top of satisfyGoal
  • at the top of removeAndInsertActivitiesFromSimulation
    If it has been canceled, it will throw a SchedulingInterruptedException, which will bubble up until it hits the SynchronousSchedulerAgent, which will catch the exception and report the scheduling run as canceled.

Unlike with simulation, partial results are not returned.

Verification

  • Unit tests have been updated with the new schedule syntax. All of them have been set to uncancelable.
  • A new e2e test was added to check that canceling works and updates the reason column.

Documentation

No docs need to be updated.

Future work

UI needs to be updated to allow for canceling an in-progress Scheduling Run

@Mythicaeda Mythicaeda added breaking change A change that will require updating downstream code feature A new feature or feature request scheduling Anything related to the scheduling domain labels Dec 4, 2023
@Mythicaeda Mythicaeda requested a review from a team as a code owner December 4, 2023 19:36
@Mythicaeda Mythicaeda requested a review from mattdailis December 4, 2023 19:36
Copy link
Contributor

@adrienmaillard adrienmaillard left a comment

Choose a reason for hiding this comment

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

As usual, nice and spotless work

- Scheduling will check if it has been canceled:
  - before computing simulation results
  - before processing a batch in simulation
  - before initializing the plan
  - at the top of `satisfyGoal`
  - at the top of `removeAndInsertActivitiesFromSimulation`
- If it has been canceled, it will throw a `SchedulingInterruptedException`, which will bubble up until it hits the `SynchronousSchedulerAgent`, which will catch it and report the simulation as canceled.
- Make uploading the Foo Jar a method on GatewayRequests
- Change bad status from Simulation/Scheduling from an IOException to fail()
@Mythicaeda Mythicaeda force-pushed the feat/cancel-scheduling branch from b85cd93 to f1f82b1 Compare December 7, 2023 01:11
@Mythicaeda Mythicaeda merged commit a2cc355 into develop Dec 7, 2023
10 checks passed
@Mythicaeda Mythicaeda deleted the feat/cancel-scheduling branch December 7, 2023 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A change that will require updating downstream code feature A new feature or feature request scheduling Anything related to the scheduling domain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need a way to stop a scheduling run
3 participants