Skip to content

Add manual cluster restart options#50

Merged
andrussal merged 4 commits intodevfrom
andrussal/manual-cluster-node-args
Apr 23, 2026
Merged

Add manual cluster restart options#50
andrussal merged 4 commits intodevfrom
andrussal/manual-cluster-node-args

Conversation

@andrussal
Copy link
Copy Markdown
Collaborator

@andrussal andrussal commented Apr 2, 2026

This extends StartNodeOptions in two ways:

  • adds launch args, so local manual-cluster restart can exercise real CLI overrides such as --net-initial-peers
  • adds runtime.start_timeout, so tests can override readiness timeout per node when needed
use std::time::Duration;

use testing_framework_core::scenario::StartNodeOptions;

cluster
    .restart_node_with(
        "node-2",
        StartNodeOptions::default()
            .with_args([
                "--net-initial-peers",
                "/ip4/127.0.0.1/udp/30001/quic-v1",
            ])
            .with_start_timeout(Duration::from_secs(180)),
    )
    .await?;

@andrussal andrussal requested a review from hansieodendaal April 2, 2026 08:30
Comment on lines +508 to +512
if !matches!(options.peers, PeerSelection::DefaultLayout) {
return Err(NodeManagerError::InvalidArgument {
message: "restart_node_with does not support peer selection overrides".to_string(),
});
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Question: Should PeerSelection not be compared to what it was before the restart?

Otherwise looking good.

Copy link
Copy Markdown
Collaborator Author

@andrussal andrussal Apr 23, 2026

Choose a reason for hiding this comment

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

Yes this wasn't ideal, I made PeerSelection an Option like other fields so we don't have to handle it explicitly somehow.

@hansieodendaal
Copy link
Copy Markdown
Contributor

Not directly related to this PR: Could we maybe add a configurable start timeout, instead of only using 60s?

@andrussal andrussal force-pushed the andrussal/manual-cluster-node-args branch from 5b8610a to e6d692f Compare April 23, 2026 03:53
@andrussal
Copy link
Copy Markdown
Collaborator Author

Not directly related to this PR: Could we maybe add a configurable start timeout, instead of only using 60s?

I added also option to override, see updated PR description.

Copy link
Copy Markdown
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

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

LGTM!

@andrussal andrussal merged commit 4854942 into dev Apr 23, 2026
5 checks passed
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.

2 participants