Skip to content

Require one cluster with BOOTSTRAP_DIR, rename FORBID_RESPIN - #3713

Merged
mkoura merged 2 commits into
masterfrom
bootstrap_single_cluster
Sep 25, 2026
Merged

mkoura merged 2 commits into
masterfrom
bootstrap_single_cluster

Conversation

@mkoura

@mkoura mkoura commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Single cluster with BOOTSTRAP_DIR: a testnet set up from BOOTSTRAP_DIR can only back one cluster instance. configuration.py now raises an error when CLUSTERS_COUNT is not 1 in that case. This also catches the case where CLUSTERS_COUNT is unset and falls back to the xdist worker count (e.g. plain pytest -n 4). Previously the framework would try to run several instances against the testnet. The testnets runner target already exports CLUSTERS_COUNT=1, so it is not affected.
  • Rename FORBID_RESTART to FORBID_RESPIN: the option forbids respinning cluster instances, so it now uses the term the cluster management code uses. Runner scripts, .source.dev, the framework tests, docs and related comments are updated.

Breaking change

The old FORBID_RESTART env var is no longer recognized. External CI jobs or local scripts that set FORBID_RESTART=true must switch to FORBID_RESPIN=true. Otherwise the setting is silently ignored and clusters may get respun.

A testnet set up from BOOTSTRAP_DIR can only back a single cluster
instance. Raise an error when CLUSTERS_COUNT is not 1, including when
it was derived from the xdist worker count, instead of trying to
run multiple instances against the testnet.
The option forbids respinning cluster instances, so name it after the
term the cluster management code uses. The old FORBID_RESTART env var
is no longer recognized.
@mkoura
mkoura requested a review from saratomaz as a code owner September 25, 2026 12:36
@mkoura
mkoura requested a lite review from Copilot and removed request for saratomaz September 25, 2026 12:36

Copilot AI left a comment

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.

Copilot review overview

🔵 Needs a closer look

Add tests covering invalid and valid BOOTSTRAP_DIR cluster-count configurations.

Review effort: Lite
Findings: None

What changed in this PR

This PR enforces single-cluster use of BOOTSTRAP_DIR and renames FORBID_RESTART to FORBID_RESPIN.

Changes:

  • Validates CLUSTERS_COUNT=1 for bootstrap-directory configurations.
  • Updates scripts, cluster management, tests, and documentation for FORBID_RESPIN.
File Description
scripts/​setup_test_env.sh Uses FORBID_RESPIN.
runner/​run_tests.sh Updates runner documentation and exports.
runner/​node_upgrade.sh Uses the renamed variable.
framework_tests/​test_cluster_getter.py Updates configuration references.
cardano_node_tests/​utils/​configuration.py Adds single-cluster bootstrap validation.
cardano_node_tests/​cluster_management/​cluster_getter.py Applies the renamed respin setting.
agent_docs/​tag_testing.md Updates tag-testing documentation.
.source.dev Updates development environment setup.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mkoura
mkoura merged commit f1d12b0 into master Sep 25, 2026
4 checks passed
@mkoura
mkoura deleted the bootstrap_single_cluster branch September 25, 2026 12:44
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