Skip to content

Commit 219a3df

Browse files
authored
Fixed failing recreate-kind-clusters (#525)
# Summary This PR: * removes unnecessary echo in root-context which prevented to switch context in case of non empty OVERRIDE_VERSION_ID (we cannot echo anything in context files) * fixes evg_host.sh recreate_kind_clusters as `configure` called from it always expected to have arguments and shift command failed in case there are none. ## Proof of Work Only tested locally. ## Checklist - [ ] Have you linked a jira ticket and/or is the ticket in the title? - [ ] Have you checked whether your jira ticket required DOCSP changes? - [ ] Have you added changelog file? - use `skip-changelog` label if not needed - refer to [Changelog files and Release Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes) section in CONTRIBUTING.md for more details
1 parent 87b203f commit 219a3df

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

scripts/dev/contexts/root-context

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export OPS_MANAGER_NAMESPACE="operator-testing-50-current"
4747
export LOCAL_RUN=true
4848

4949
if [[ "${OVERRIDE_VERSION_ID:-}" != "" ]]; then
50-
echo "Overriding operator related versions with ${OVERRIDE_VERSION_ID}"
5150
OPERATOR_VERSION="${OVERRIDE_VERSION_ID}"
5251
READINESS_PROBE_VERSION="${OVERRIDE_VERSION_ID}"
5352
VERSION_UPGRADE_HOOK_VERSION="${OVERRIDE_VERSION_ID}"

scripts/dev/evg_host.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fi
3838
kubeconfig_path="${HOME}/.operator-dev/evg-host.kubeconfig"
3939

4040
configure() {
41-
shift 1
41+
shift || true
4242
auto_recreate="false"
4343

4444
# Parse arguments
@@ -64,7 +64,7 @@ configure() {
6464
jq '. | with_entries(select(.key == "auths"))' "${HOME}/.docker/config.json" | ssh -T -q "${host_url}" 'cat > /home/ubuntu/.docker/config.json'
6565
fi
6666

67-
sync
67+
sync | prepend "sync"
6868

6969
ssh -T -q "${host_url}" "cd ~/mongodb-kubernetes; scripts/dev/switch_context.sh root-context; scripts/dev/setup_evg_host.sh ${auto_recreate}"
7070
}

scripts/dev/setup_evg_host.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
set -Eeou pipefail
66

77
source scripts/funcs/install
8+
source scripts/funcs/printing
89

910
set_limits() {
1011
echo "Increasing fs.inotify.max_user_instances"
@@ -61,14 +62,14 @@ download_helm() {
6162
rm -rf linux-"${ARCH}/"
6263
}
6364

64-
set_limits
65-
download_kind &
66-
download_kubectl &
67-
download_helm &
65+
set_limits | prepend "set_limits"
66+
download_kind | prepend "download_kind" &
67+
download_kubectl | prepend "download_kubectl" &
68+
download_helm | prepend "download_helm" &
6869

6970
AUTO_RECREATE=${1:-false}
7071
if [[ "${AUTO_RECREATE}" == "true" ]]; then
71-
set_auto_recreate &
72+
set_auto_recreate | prepend "set_auto_recreate" &
7273
fi
7374

7475
wait

0 commit comments

Comments
 (0)