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

fix(rln-relay): graceful shutdown with non-zero exit code #2429

Merged
merged 4 commits into from
Feb 15, 2024

Conversation

rymnc
Copy link
Contributor

@rymnc rymnc commented Feb 14, 2024

Description

This PR follows the pattern set by the waku_archive protocol, which propagates fatal error handling to appropriate protocols, without which the node goes into UB.

Changes

  • new module error_handling in waku_common, which is imported by waku_archive and waku_rln_relay, exporting a type OnFatalErrorHandler
  • propagate onFatalErrorAction to waku_rln_relay

How to test

  1. Run a wakunode, after the protocols are mounted, disable your internet. you will see the following -
image

Copy link

This PR may contain changes to database schema of one of the drivers.

If you are introducing any changes to the schema, make sure the upgrade from the latest release to this change passes without any errors/issues.

Please make sure the label release-notes is added to make sure upgrade instructions properly highlight this change.

Copy link

github-actions bot commented Feb 14, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2429

Built from 0593aac

@rymnc rymnc marked this pull request as ready for review February 14, 2024 10:46
@rymnc rymnc force-pushed the graceful-non-zero-exit-code-rln branch from c1ca0f4 to 2c176d7 Compare February 14, 2024 11:36
@rymnc rymnc self-assigned this Feb 14, 2024
@rymnc rymnc added the E:RLN on mainnet see https://github.com/waku-org/pm/issues/98 for details label Feb 14, 2024
Copy link
Contributor

@gabrielmer gabrielmer left a comment

Choose a reason for hiding this comment

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

LGTM 🔥 🔥 🔥

Thanks so much!

Copy link
Collaborator

@Ivansete-status Ivansete-status left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks for it! 💯

Just added minor comments

rlnRelayCredPath*: string
rlnRelayCredPassword*: string
rlnRelayTreePath*: string
# defined in waku_archive, but do not want to import it here
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry I can't quite understand the comment:)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed in efd1b01

rymnc and others added 2 commits February 15, 2024 14:52
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
Copy link
Contributor

@NagyZoltanPeter NagyZoltanPeter left a comment

Choose a reason for hiding this comment

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

Great stuff! LGTM.

@rymnc rymnc merged commit 22026b7 into master Feb 15, 2024
10 checks passed
@rymnc rymnc deleted the graceful-non-zero-exit-code-rln branch February 15, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:RLN on mainnet see https://github.com/waku-org/pm/issues/98 for details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants