-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: allow automatically replacing a node even if it is active as a…
…n API BN (#3707) When a node is redeployed, but hasn't been removed from the registry before that, it is automatically replaced: the old node record is removed and the new one created. Initially, this was only possible for unassigned nodes. Then, functionality was added such that this also worked for nodes assigned to a subnet. This PR enables the same behavior for API boundary nodes. When a node that is currently active as API boundary node is redeployed, the old node record and the old API boundary node record are removed, and a new node record and a new API boundary node record are created. We can't just use any node as API boundary node. The node needs to be configured with a domain name. This case will fail as we have an invariant in `invariants/api_boundary_node.rs` that ensures that each API boundary node record has an associated node record with a domain name. In addition, I removed the test `should_replace_node_in_subnet` in `do_remove_node_directly.rs` as it is a literal copy of `should_replace_node_in_subnet_and_update_allowance` with one difference in the comment of line 458 and 528.
- Loading branch information
Showing
4 changed files
with
214 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.