Skip to content

Interrupt cardano nodes when cardano-testnet gets interrupted #6240

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nbacquey
Copy link
Contributor

@nbacquey nbacquey commented Jun 5, 2025

Description

This PR fixes a bug where the nodes spun up by cardano-testnet were not interrupted when said testnet was interrupted (the normal way) by receiving SIGINT.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-9.6 and ghc-9.12
  • Self-reviewed the diff

Note on CI

If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.

@nbacquey nbacquey requested a review from a team as a code owner June 5, 2025 14:42
Copy link
Contributor

@carbolymer carbolymer left a comment

Choose a reason for hiding this comment

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

@nbacquey nbacquey force-pushed the nb/interrupt_nodes branch 2 times, most recently from e1bed50 to ab3b54e Compare June 5, 2025 15:35
@@ -1,4 +1,5 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
Copy link
Contributor

@carbolymer carbolymer Jun 5, 2025

Choose a reason for hiding this comment

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

You solution is correct IMO. One small thing: depending on CPP breaks code formatters (both stylish and fourmolu give up). So from developer experience it is a bit annoying. So can I ask you to create a separate haskell module which uses CPP extension and conditionally installs the handler?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in latest commit

@nbacquey nbacquey force-pushed the nb/interrupt_nodes branch 2 times, most recently from 1639b00 to 6e2b121 Compare June 5, 2025 16:09
@nbacquey nbacquey requested a review from carbolymer June 5, 2025 16:11
@nbacquey nbacquey force-pushed the nb/interrupt_nodes branch 3 times, most recently from 3d40313 to 80f42b0 Compare June 5, 2025 16:29
@nbacquey nbacquey force-pushed the nb/interrupt_nodes branch from 80f42b0 to 6dad4e2 Compare June 5, 2025 16:38
Copy link
Contributor

@carbolymer carbolymer left a comment

Choose a reason for hiding this comment

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

Great work, thanks!

@nbacquey nbacquey enabled auto-merge June 5, 2025 17:43
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants