Skip to content

Commit a6f7631

Browse files
authored
remove support for canton-network-node in operator flux config (#1041)
Signed-off-by: Itai Segall <itai.segall@digitalasset.com>
1 parent cff2f67 commit a6f7631

File tree

3 files changed

+16
-37
lines changed

3 files changed

+16
-37
lines changed

build-tools/cncluster

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,17 +2122,18 @@ function subcmd_purge_unused_dbs() {
21222122
subcommand_whitelist[set_operator_deployment_reference]="Set the git reference for the operator deployment in the cluster config file"
21232123
function subcmd_set_operator_deployment_reference() {
21242124

2125-
if [ "$#" -lt 2 ]; then
2126-
echo "Usage: $0 set_operator_deployment_reference <branch> <repo>"
2125+
# TODO(#1062): remove the ignored parameter once the base version for migration tests is >= 0.4.2
2126+
if [ "$#" -lt 1 ]; then
2127+
echo "Usage: $0 set_operator_deployment_reference <branch> [<ignored>]"
21272128
exit 1
21282129
fi
21292130
if [ "$#" -gt 2 ]; then
2130-
echo "Usage: $0 set_operator_deployment_reference <branch> <repo>"
2131+
echo "Usage: $0 set_operator_deployment_reference <branch> [<ignored>]"
21312132
exit 1
21322133
fi
21332134
deployment_config=$(cat <<EOF
21342135
reference:
2135-
$(_get_flux_reference_config "$1" "$2" " ")
2136+
$(_get_flux_reference_config "$1" " ")
21362137
EOF
21372138
)
21382139
_update_cluster_config "$deployment_config" "operatorDeployment"

build-tools/lib/hard-domain-migration-commands

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ function subcmd_update_config() {
1919
migration_id="$2"
2020
shift 2
2121
else
22-
_error "Usage: $0 $SCRIPTNAME migration_type migration_id [version] [<git_reference> <git_repo>]"
22+
# TODO(#1062): remove the ignored parameter once the base version for migration tests is >= 0.4.2
23+
_error "Usage: $0 $SCRIPTNAME migration_type migration_id [version] [<git_reference> [<ignored>]]"
2324
fi
2425
local migration_config
2526
migration_config=$(cat <<EOF
@@ -34,17 +35,17 @@ EOF
3435
)
3536
shift
3637
fi
38+
# TODO(#1062): remove the ignored parameter once the base version for migration tests is >= 0.4.2
3739
if [ "$#" -gt 0 ]; then
38-
if [ "$#" -lt 2 ]; then
39-
_error "Usage: $0 $SCRIPTNAME migration_type migration_id [version] [<git_reference> <git_repo>]"
40+
if [ "$#" -lt 1 ]; then
41+
_error "Usage: $0 $SCRIPTNAME migration_type migration_id [version] [<git_reference> [<ignored>]]"
4042
fi
4143
git_reference="$1"
42-
git_repo="$2"
4344
shift
4445
migration_config+=$(cat <<EOF
4546
4647
releaseReference:
47-
$(_get_flux_reference_config $git_reference $git_repo " ")
48+
$(_get_flux_reference_config $git_reference " ")
4849
EOF
4950
)
5051
fi

build-tools/lib/pulumi-helpers

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -169,32 +169,12 @@ function _killable_pulumi_automation_run() {
169169

170170
function _get_flux_reference_config() {
171171
gitRef="$1"
172-
repo="$2"
173-
indentation="$3"
174-
if [ "$repo" == "canton-network-node" ]; then
175-
176-
cat <<EOF
177-
${indentation}repoUrl: https://github.com/DACH-NY/canton-network-node
178-
${indentation}gitReference: $gitRef
179-
${indentation}pulumiStacksDir: "cluster/stacks/$(basename $PULUMI_STACKS_DIR)"
180-
${indentation}pulumiBaseDir: "cluster/pulumi"
181-
${indentation}deploymentDir: "cluster/deployment"
182-
${indentation}spliceRoot: "."
183-
${indentation}privateConfigsDir: "cluster/configs-private"
184-
${indentation}publicConfigsDir: "cluster/configs"
185-
EOF
186-
187-
elif [ "$repo" == "canton-network-internal" ]; then
188-
189-
if [ -z "${DA_REPO_ROOT:-}" ]; then
190-
_error "Deploying from canton-network-internal should be configured only from that repo"
191-
fi
192-
# TODO(#17841): once we stop symlinking deployment directories from splice
193-
# to canton-network-internal, assert here that the cluster has been fully
194-
# migrated to the internal repo (i.e. its deployment dir and stack files
195-
# exist there)
172+
indentation="$2"
173+
if [ -z "${DA_REPO_ROOT:-}" ]; then
174+
_error "Deploying from canton-network-internal should be configured only from that repo"
175+
fi
196176

197-
cat <<EOF
177+
cat <<EOF
198178
${indentation}repoUrl: https://github.com/DACH-NY/canton-network-internal
199179
${indentation}gitReference: $gitRef
200180
${indentation}pulumiBaseDir: "splice/cluster/pulumi"
@@ -204,9 +184,6 @@ ${indentation}spliceRoot: "splice"
204184
${indentation}privateConfigsDir: "cluster/configs/configs-private"
205185
${indentation}publicConfigsDir: "cluster/configs/configs"
206186
EOF
207-
else
208-
_error "Unknown repo $repo"
209-
fi
210187
}
211188

212189
# Update the cluster config file

0 commit comments

Comments
 (0)