Skip to content

Conversation

@aryanjassal
Copy link
Contributor

@aryanjassal aryanjassal commented Feb 10, 2025

Description

Often, some background task handlers hold the agent open when we are trying to shutdown. The only solution is to send a SIGKILL to the process to forcefully shut it down. This should not happen.

Issues Fixed

Tasks

  • 1. Add cancellation to Discovery.discoverVertexHandler
  • 2. Add cancellation to NodeManager.syncNodeGraphHandler
  • 3. Add cancellation to NodeManager.checkConnectionsHandler
  • 4. Add cancellation to NodeManager.refreshBucketHandler

Final checklist

  • Domain specific tests
  • Full tests
  • Updated inline-comment documentation
  • Lint fixed
  • Squash and rebased
  • Sanity check the final build

@aryanjassal aryanjassal self-assigned this Feb 10, 2025
@linear
Copy link

linear bot commented Feb 10, 2025

ENG-322

@aryanjassal
Copy link
Contributor Author

There were some weird issues happening when I attempt to link Polykey's dist directory to Polykey CLI's node_modules for testing the changes. This was resolved by simply copying the dist for Polykey instead of linking it. I believe this was due to the libraries not aligning when using linking.

Copy link
Contributor

@tegefaulkes tegefaulkes left a comment

Choose a reason for hiding this comment

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

You've added @timedCancellable(true) all over the place. Keep in mind that without a default timeout provided then it will default to infinite timeout. In most cases we don't want this. Check what the existing @timedCancellable usage for each file is doing.

chore: resolved failing Discovery tests

chore: resolved failing Nodes tests
@aryanjassal aryanjassal force-pushed the feature-agent-stop-termination branch from 1df6f65 to 584af7f Compare February 11, 2025 05:27
@aryanjassal aryanjassal marked this pull request as ready for review February 11, 2025 05:28
@aryanjassal aryanjassal merged commit 5b16a53 into staging Feb 11, 2025
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

polykey agent stop command not terminating properly

4 participants