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

Refactor/move process handling #607

Merged
merged 2 commits into from
Feb 11, 2025
Merged

Conversation

Nukesor
Copy link
Owner

@Nukesor Nukesor commented Feb 11, 2025

Move all process handling related logic into the daemon.

This includes creating a new InternalState struct that wraps the old State struct.

State now no longer contains the children, callbacks or shutdown fields.

@Nukesor Nukesor self-assigned this Feb 11, 2025
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 85.53846% with 47 lines in your changes missing coverage. Please review.

Project coverage is 80.34%. Comparing base (a3519bd) to head (d6047e2).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pueue/src/daemon/internal_state/state.rs 87.50% 23 Missing ⚠️
pueue/src/process_helper/mod.rs 12.50% 7 Missing ⚠️
...ueue/src/daemon/network/message_handler/enqueue.rs 45.45% 6 Missing ⚠️
pueue/src/daemon/network/message_handler/stash.rs 45.45% 6 Missing ⚠️
pueue/src/daemon/process_handler/finish.rs 71.42% 2 Missing ⚠️
pueue/src/daemon/mod.rs 83.33% 1 Missing ⚠️
pueue/src/daemon/process_handler/kill.rs 80.00% 1 Missing ⚠️
pueue_lib/src/state.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #607      +/-   ##
==========================================
- Coverage   80.54%   80.34%   -0.21%     
==========================================
  Files          78       78              
  Lines        5984     6018      +34     
==========================================
+ Hits         4820     4835      +15     
- Misses       1164     1183      +19     

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

Copy link

github-actions bot commented Feb 11, 2025

Test Results

  3 files  ±0   19 suites  ±0   3m 21s ⏱️ -2s
174 tests ±0  174 ✅ ±0  0 💤 ±0  0 ❌ ±0 
366 runs  ±0  366 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit a42d833. ± Comparison against base commit a3519bd.

This pull request removes 7 and adds 7 tests. Note that renamed tests count towards both.
pueue-lib ‑ process_helper::platform::test::test_spawn_command
pueue-lib ‑ process_helper::unix::tests::test_normal_command_children_are_killed
pueue-lib ‑ process_helper::unix::tests::test_normal_command_is_killed
pueue-lib ‑ process_helper::unix::tests::test_shell_command_children_are_killed
pueue-lib ‑ process_helper::unix::tests::test_shell_command_is_killed
pueue-lib ‑ process_helper::unix::tests::test_shell_command_is_killed_with_signal
pueue-lib ‑ process_helper::unix::tests::test_spawn_command
pueue ‑ process_helper::platform::test::test_spawn_command
pueue ‑ process_helper::unix::tests::test_normal_command_children_are_killed
pueue ‑ process_helper::unix::tests::test_normal_command_is_killed
pueue ‑ process_helper::unix::tests::test_shell_command_children_are_killed
pueue ‑ process_helper::unix::tests::test_shell_command_is_killed
pueue ‑ process_helper::unix::tests::test_shell_command_is_killed_with_signal
pueue ‑ process_helper::unix::tests::test_spawn_command

♻️ This comment has been updated with latest results.

@Nukesor Nukesor force-pushed the refactor/move-process-handling branch 3 times, most recently from 6a6755b to a42d833 Compare February 11, 2025 12:37
Create the InternalState struct, which is only available to the Pueue
daemon. This prevents exposure of daemon runtime data to any client
and removes process related dependencies from the pueue_lib.
@Nukesor Nukesor force-pushed the refactor/move-process-handling branch from a42d833 to d6047e2 Compare February 11, 2025 12:41
@Nukesor Nukesor merged commit aa19740 into main Feb 11, 2025
16 checks passed
@Nukesor Nukesor deleted the refactor/move-process-handling branch February 11, 2025 12:42
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.

1 participant