From c5f1e9c69fcd38e40c1264a3d2f09ea1748ece39 Mon Sep 17 00:00:00 2001 From: Adam Dyess Date: Tue, 6 Feb 2024 11:15:01 -0600 Subject: [PATCH 1/4] Update validation jobs to 3.1/stable (and some to 3.3/stable) --- jobs/ci-master.yaml | 2 +- jobs/infra/playbook-jenkins.yml | 4 ++-- jobs/validate-offline/playbook.yml | 2 +- jobs/validate.yaml | 2 +- jobs/validate/playbooks/single-system.yml | 2 +- requirements.txt | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jobs/ci-master.yaml b/jobs/ci-master.yaml index 8c3ae8d3a..fed46e48e 100644 --- a/jobs/ci-master.yaml +++ b/jobs/ci-master.yaml @@ -89,7 +89,7 @@ name: juju_channel description: |- specify the juju channel to use - default: 2.9/stable + default: 3.1/stable - parameter: name: series-stable diff --git a/jobs/infra/playbook-jenkins.yml b/jobs/infra/playbook-jenkins.yml index 43a0333f2..4331fafaa 100644 --- a/jobs/infra/playbook-jenkins.yml +++ b/jobs/infra/playbook-jenkins.yml @@ -128,7 +128,7 @@ - jenkins - adhoc - name: upgrade juju - command: "snap refresh juju --channel 2.9/stable --classic" + command: "snap refresh juju --channel 3.1/stable --classic" ignore_errors: yes tags: - jenkins @@ -153,7 +153,7 @@ - "charmcraft --classic --edge" - "go --classic --stable" - "google-cloud-cli --classic --channel latest/stable" - - "juju --classic --channel=2.9/stable" + - "juju --classic --channel=3.1/stable" - "juju-crashdump --classic --edge" - "juju-wait --classic" - "kubectl --classic" diff --git a/jobs/validate-offline/playbook.yml b/jobs/validate-offline/playbook.yml index 23188a53d..0e2d4fdc0 100644 --- a/jobs/validate-offline/playbook.yml +++ b/jobs/validate-offline/playbook.yml @@ -27,7 +27,7 @@ command: "snap install {{item}}" ignore_errors: yes loop: - - "juju --classic --channel=2.9/stable" + - "juju --classic --channel=3.1/stable" - "juju-wait --classic" - "lxd" tags: diff --git a/jobs/validate.yaml b/jobs/validate.yaml index cffe6e285..8f7166047 100644 --- a/jobs/validate.yaml +++ b/jobs/validate.yaml @@ -33,8 +33,8 @@ description: |- specify the juju channel to use values: - - 2.9/stable - 3.1/stable + - 3.3/stable - axis: type: user-defined name: snap_version diff --git a/jobs/validate/playbooks/single-system.yml b/jobs/validate/playbooks/single-system.yml index b59f742ab..cc840fa56 100644 --- a/jobs/validate/playbooks/single-system.yml +++ b/jobs/validate/playbooks/single-system.yml @@ -34,7 +34,7 @@ command: "snap install {{item}}" ignore_errors: yes loop: - - "juju --classic --channel=2.9/stable" + - "juju --classic --channel=3.1/stable" - "juju-wait --classic" - "juju-crashdump --classic --edge" - "lxd" diff --git a/requirements.txt b/requirements.txt index 030e46dd8..b8f195f05 100644 --- a/requirements.txt +++ b/requirements.txt @@ -110,7 +110,7 @@ jmespath==1.0.1 # via # boto3 # botocore -juju==3.2.3.0 +juju==3.3.0.0 # via -r requirements.in kubernetes==26.1.0 # via juju From eefe3090f5d3310b9ad85facab95f0ddcdd0b85e Mon Sep 17 00:00:00 2001 From: Adam Dyess Date: Tue, 6 Feb 2024 11:19:55 -0600 Subject: [PATCH 2/4] continue testing autoscaler on juju 2.9 --- jobs/validate.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jobs/validate.yaml b/jobs/validate.yaml index 8f7166047..b81af2a6d 100644 --- a/jobs/validate.yaml +++ b/jobs/validate.yaml @@ -751,7 +751,11 @@ - snap-edge - series-stable - lxc-runner-params - - juju-lts + - string: + name: juju_channel + description: |- + specify the juju channel to use + default: 2.9/stable - string: name: LXC_SNAP_LIST description: |- From 5c5e2d5d81e3a75b4699664a6eff1d1ea3a695cb Mon Sep 17 00:00:00 2001 From: Adam Dyess Date: Wed, 7 Feb 2024 07:46:48 -0600 Subject: [PATCH 3/4] juju33 deprecates destroy-model '-y' --- ci.bash | 4 ++-- jobs/integration/conftest.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ci.bash b/ci.bash index 865767652..0618ac3fe 100644 --- a/ci.bash +++ b/ci.bash @@ -254,8 +254,8 @@ function ci::cleanup::before function ci::cleanup::model::addons { - if ! timeout 10m juju destroy-model -y --destroy-storage "$JUJU_CONTROLLER:addons"; then - timeout 10m juju destroy-model -y --destroy-storage "$JUJU_CONTROLLER:addons" --force + if ! timeout 10m juju destroy-model --no-prompt --destroy-storage "$JUJU_CONTROLLER:addons"; then + timeout 10m juju destroy-model --no-prompt --destroy-storage "$JUJU_CONTROLLER:addons" --force fi } diff --git a/jobs/integration/conftest.py b/jobs/integration/conftest.py index b8bb0ec97..c907d6e3c 100644 --- a/jobs/integration/conftest.py +++ b/jobs/integration/conftest.py @@ -403,7 +403,7 @@ async def k8s_model(k8s_cloud, tools): "--destroy-storage", "--force", "--no-wait", - "-y", + "--no-prompt", tools.k8s_connection, ) @@ -541,7 +541,7 @@ async def deploy(request, tools): await _model_obj.connect(f"{tools.controller_name}:{nonce_model}") yield (tools.controller_name, _model_obj) await _model_obj.disconnect() - await tools.run("juju", "destroy-model", "-y", nonce_model) + await tools.run("juju", "destroy-model", "--no-prompt", nonce_model) @pytest.fixture(scope="module") From 5abaef8e8ac1052b271a52d8e750442329775981 Mon Sep 17 00:00:00 2001 From: Adam Dyess Date: Fri, 9 Feb 2024 11:16:11 -0600 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Kevin W Monroe --- jobs/infra/playbook-jenkins.yml | 4 ++-- jobs/validate-offline/playbook.yml | 2 +- jobs/validate/playbooks/single-system.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jobs/infra/playbook-jenkins.yml b/jobs/infra/playbook-jenkins.yml index 4331fafaa..9f1a9753a 100644 --- a/jobs/infra/playbook-jenkins.yml +++ b/jobs/infra/playbook-jenkins.yml @@ -128,7 +128,7 @@ - jenkins - adhoc - name: upgrade juju - command: "snap refresh juju --channel 3.1/stable --classic" + command: "snap refresh juju --channel 3.1/stable" ignore_errors: yes tags: - jenkins @@ -153,7 +153,7 @@ - "charmcraft --classic --edge" - "go --classic --stable" - "google-cloud-cli --classic --channel latest/stable" - - "juju --classic --channel=3.1/stable" + - "juju --channel=3.1/stable" - "juju-crashdump --classic --edge" - "juju-wait --classic" - "kubectl --classic" diff --git a/jobs/validate-offline/playbook.yml b/jobs/validate-offline/playbook.yml index 0e2d4fdc0..a81d31bdf 100644 --- a/jobs/validate-offline/playbook.yml +++ b/jobs/validate-offline/playbook.yml @@ -27,7 +27,7 @@ command: "snap install {{item}}" ignore_errors: yes loop: - - "juju --classic --channel=3.1/stable" + - "juju --channel=3.1/stable" - "juju-wait --classic" - "lxd" tags: diff --git a/jobs/validate/playbooks/single-system.yml b/jobs/validate/playbooks/single-system.yml index cc840fa56..7dade5811 100644 --- a/jobs/validate/playbooks/single-system.yml +++ b/jobs/validate/playbooks/single-system.yml @@ -34,7 +34,7 @@ command: "snap install {{item}}" ignore_errors: yes loop: - - "juju --classic --channel=3.1/stable" + - "juju --channel=3.1/stable" - "juju-wait --classic" - "juju-crashdump --classic --edge" - "lxd"