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

Implement Cancel Safety using CmdExecution and blocks #163

Merged
merged 104 commits into from
Dec 28, 2023

Conversation

azriel91
Copy link
Owner

@azriel91 azriel91 commented Aug 25, 2023

Closes #141.

Plenty to do:

  • CmdExecution for all *Cmds
  • API refinement
  • Use interruptible between CmdBlock executions.

All very large tasks.

Don't forget:

  • Replace panic!s in fetches with Error (probably).
  • Include the CmdBlock::Input and Outcome types in the error message.
  • Include the CmdExecution's chain of CmdBlocks in the error message.
  • Pass in state_clean from the StatesClean map, instead of allocating another.
  • Use interruptible in each CmdBlock's item iterator.

@azriel91 azriel91 marked this pull request as draft August 25, 2023 05:29
@azriel91 azriel91 force-pushed the feature/141/cancel-safety branch from 161fda9 to c0680c4 Compare August 25, 2023 05:31
@azriel91 azriel91 force-pushed the feature/141/cancel-safety branch 2 times, most recently from 8280e00 to 4fd980e Compare August 25, 2023 11:32
@azriel91 azriel91 force-pushed the feature/141/cancel-safety branch from 4fd980e to 366280b Compare August 26, 2023 04:19
@codecov
Copy link

codecov bot commented Aug 26, 2023

Codecov Report

Attention: 220 lines in your changes are missing coverage. Please review.

Comparison is base (1f3561d) 92.45% compared to head (38afe59) 93.42%.

Files Patch % Lines
...src/cmd_blocks/apply_state_sync_check_cmd_block.rs 79.94% 71 Missing ⚠️
crate/rt/src/cmd_blocks/apply_exec_cmd_block.rs 91.16% 31 Missing ⚠️
crate/cmd_rt/src/cmd_execution.rs 90.14% 28 Missing ⚠️
...ate/rt/src/cmd_blocks/states_discover_cmd_block.rs 96.67% 18 Missing ⚠️
crate/cmd_rt/src/cmd_block/cmd_block_wrapper.rs 82.85% 12 Missing ⚠️
...t/src/cmd_execution/cmd_execution_error_builder.rs 93.38% 8 Missing ⚠️
crate/cmd/src/scopes/single_profile_no_flow.rs 22.22% 7 Missing ⚠️
crate/rt/src/cmd_blocks/diff_cmd_block.rs 94.28% 6 Missing ⚠️
crate/cmd/src/scopes/single_profile_single_flow.rs 66.66% 5 Missing ⚠️
crate/rt/src/cmds/ensure_cmd.rs 96.75% 5 Missing ⚠️
... and 15 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #163      +/-   ##
==========================================
+ Coverage   92.45%   93.42%   +0.97%     
==========================================
  Files         378      404      +26     
  Lines       35781    40999    +5218     
==========================================
+ Hits        33080    38305    +5225     
+ Misses       2701     2694       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@azriel91 azriel91 force-pushed the feature/141/cancel-safety branch from 8a1e22b to fcc0cb5 Compare December 1, 2023 06:48
@azriel91 azriel91 marked this pull request as ready for review December 28, 2023 04:46
@azriel91 azriel91 merged commit bebd99c into main Dec 28, 2023
13 checks passed
@azriel91 azriel91 deleted the feature/141/cancel-safety branch December 28, 2023 04:53
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.

ApplyCmd: Cancel safety
1 participant