From d417fd769e796285588d315be00037a87a5fd4da Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Fri, 15 Mar 2024 16:45:45 -0500 Subject: [PATCH 1/2] Use 'kubectl config' to edit kubeconfig file Edit the server line in the kubeconfig file by using the `kubectl config set-server` command. I recently updated my yq(1) and the new one no longer works as this code expected. So, switch to kubectl for this work; it specifically has a function to do this anyway. Signed-off-by: Dean Roehrich --- testsuite/integration/kind/kind.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/integration/kind/kind.sh b/testsuite/integration/kind/kind.sh index adcfb11..e529c38 100755 --- a/testsuite/integration/kind/kind.sh +++ b/testsuite/integration/kind/kind.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# Copyright 2022-2023 Hewlett Packard Enterprise Development LP +# Copyright 2022-2024 Hewlett Packard Enterprise Development LP # Other additional copyright holders may be indicated within. # # The entirety of this work is licensed under the Apache License, @@ -71,7 +71,7 @@ install_dependencies () { prep_kubeconfig () { set -e cp ~/.kube/config kubeconfig - yq -i e '(.clusters | map(select(.name=="kind-dws")))[0].cluster.server |= "https://dws-control-plane:6443"' kubeconfig + KUBECONFIG=kubeconfig kubectl config set-cluster kind-dws --server https://dws-control-plane:6443 chmod a+r kubeconfig KUBECONFIG=kubeconfig kubectl config use-context kind-dws KUBECONFIG=kubeconfig kubectl config set-context --current --namespace=slurm From 8ce225c262e16213ccd1f24e0578ec9bf5fe45a8 Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Mon, 18 Mar 2024 15:49:18 -0500 Subject: [PATCH 2/2] Upgrade the python docker library Upgrade the python docker library to address some bit rot that has been preventing the Integration Test workflow from succeeding. Upgrade a few other libs while I'm here. Remove the incorrect use of cache_from in the docker-compose.yml files. Signed-off-by: Dean Roehrich --- testsuite/integration/docker-compose.yml | 8 ++++---- testsuite/integration/requirements.txt | 8 ++++---- testsuite/integration/slurm/docker-compose.yml | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/testsuite/integration/docker-compose.yml b/testsuite/integration/docker-compose.yml index 463e1f5..3715a69 100644 --- a/testsuite/integration/docker-compose.yml +++ b/testsuite/integration/docker-compose.yml @@ -1,5 +1,5 @@ # -# Copyright 2022 Hewlett Packard Enterprise Development LP +# Copyright 2022-2024 Hewlett Packard Enterprise Development LP # Other additional copyright holders may be indicated within. # # The entirety of this work is licensed under the Apache License, @@ -24,8 +24,8 @@ services: image: local/integration-test:${TAG:-test} build: context: . - cache_from: - - "/tmp/.buildx-cache" + # cache_from: + # - local/integration-test:test container_name: integration-test privileged: true hostname: integration-test @@ -40,4 +40,4 @@ services: networks: default: name: slurm_default - external: true \ No newline at end of file + external: true diff --git a/testsuite/integration/requirements.txt b/testsuite/integration/requirements.txt index 3411ce5..a9d705a 100644 --- a/testsuite/integration/requirements.txt +++ b/testsuite/integration/requirements.txt @@ -1,6 +1,6 @@ pytest == 7 pytest-bdd == 6 -pytest-html == 3 -docker == 6 -kubernetes >= 25.3 -tenacity == 8 \ No newline at end of file +pytest-html == 4 +docker == 7 +kubernetes >= 27.2 +tenacity == 8 diff --git a/testsuite/integration/slurm/docker-compose.yml b/testsuite/integration/slurm/docker-compose.yml index 1d378b6..c66e57c 100644 --- a/testsuite/integration/slurm/docker-compose.yml +++ b/testsuite/integration/slurm/docker-compose.yml @@ -1,5 +1,5 @@ # -# Copyright 2022 Hewlett Packard Enterprise Development LP +# Copyright 2022-2024 Hewlett Packard Enterprise Development LP # Other additional copyright holders may be indicated within. # # The entirety of this work is licensed under the Apache License, @@ -57,8 +57,8 @@ services: context: ../../submodules/slurm-docker-cluster args: SLURM_TAG: ${SLURM_TAG:-slurm-22-05-4-1} - cache_from: - - "/tmp/.buildx-cache" + #cache_from: + # - slurm-bb:slurm-22-05-4-1 command: ["slurmctld"] container_name: slurmctld hostname: slurmctld