Merge ~mertkirpici/charm-kubernetes-service-checks:topic/juju-3.1 into charm-kubernetes-service-checks:master

Proposed by Mert Kirpici
Status: Merged
Approved by: Mert Kirpici
Approved revision: 9463989a11074669272582475617b7f4e397c875
Merged at revision: b925e55d4340a47e961116baf01ccb04356bba63
Proposed branch: ~mertkirpici/charm-kubernetes-service-checks:topic/juju-3.1
Merge into: charm-kubernetes-service-checks:master
Diff against target: 52 lines (+16/-3)
3 files modified
Makefile (+6/-1)
tests/functional/requirements.txt (+0/-1)
tox.ini (+10/-1)
Reviewer Review Type Date Requested Status
Tianqi Xiao (community) Approve
🤖 prod-jenkaas-bootstack (community) continuous-integration Approve
Erhan Sunar (community) Approve
Review via email: mp+450132@code.launchpad.net

Commit message

chore: add juju 3.1 compatibility

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Gildein (rgildein) wrote :

I'm not sure if this is the best approach because Jenkins won't run `make function31` or not?

Revision history for this message
Mert Kirpici (mertkirpici) wrote :

> I'm not sure if this is the best approach because Jenkins won't run `make
> function31` or not?

Hey Robert, part of this work is to get jenkins to run the functional31 target(which is in progress), so technically this also is still a work in progress, waiting for the 3.1 jobs to be implemented first. Sorry for the confustion.

Marking this MR as WIP until the changes on CI are implemented first.

Revision history for this message
Robert Gildein (rgildein) wrote :

Why we are not simply defining `make functional` to run `tox -e func` and
`tox -e func31`? There will be no need to do anything on CI and I'm not sure
how we will change the CI, since there is one configuration for all charms.

Revision history for this message
Robert Gildein (rgildein) wrote :

> Why we are not simply defining `make functional` to run `tox -e func` and
> `tox -e func31`? There will be no need to do anything on CI and I'm not sure
> how we will change the CI, since there is one configuration for all charms.

I spoke with Erhan about it and I he point out that in Jenkins we are using
same controller for all tests, not like with GitHub actions where we are
bootstrapping new controller before each tests.

This comment should be ignored :).

Revision history for this message
Mert Kirpici (mertkirpici) wrote (last edit ):

Yeah even if we don't end up needing this change, i.e. same zaza version supports both juju controller v2.9 and 3.1, the actual testing on both controllers need to be implemented in jenkins, potentially running both 2.9 and 3.1 jobs in parallel(in different workers) before CI comes clean.

same make target running two separate tox targets would mean the developers need to wait twice as much when they run `make functional` and have multiple juju controllers bootstrapped in their development env.

Revision history for this message
Erhan Sunar (esunar) :
review: Approve
Revision history for this message
Mert Kirpici (mertkirpici) wrote :
Revision history for this message
Tianqi Xiao (txiao) wrote :

Overall LGTM, just one small suggestion inline

review: Needs Fixing
Revision history for this message
Mert Kirpici (mertkirpici) :
Revision history for this message
Tianqi Xiao (txiao) :
Revision history for this message
Robert Gildein (rgildein) :
Revision history for this message
Mert Kirpici (mertkirpici) wrote :

update:
 - drop requirements-3.1.txt and use tox for differing requirements
 - updates echo statement in makefile.

will trigger CI and post the result.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Mert Kirpici (mertkirpici) wrote :
Revision history for this message
Tianqi Xiao (txiao) wrote :

LGTM now. Thanks :)

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision b925e55d4340a47e961116baf01ccb04356bba63

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index a99dd3b..c4e8f02 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -24,6 +24,7 @@ help:
6 @echo " make proof - run charm proof"
7 @echo " make unittests - run the tests defined in the unittest subdirectory"
8 @echo " make functional - run the tests defined in the functional subdirectory"
9+ @echo " make functional31 - run the tests defined in the functional subdirectory with juju 3.1 requirements"
10 @echo " make test - run lint, proof, unittests and functional targets"
11 @echo ""
12
13@@ -86,8 +87,12 @@ functional: build
14 @echo "Executing functional tests in ${CHARM_BUILD_DIR}"
15 @CHARM_LOCATION=${PROJECTPATH} tox -e func
16
17+functional31: build
18+ @echo "Executing functional tests in ${CHARM_BUILD_DIR} with juju 3.1 requirements"
19+ @CHARM_LOCATION=${PROJECTPATH} tox -e func31
20+
21 test: lint proof unittests functional
22 @echo "Tests completed for charm ${CHARM_NAME}."
23
24 # The targets below don't depend on a file
25-.PHONY: help submodules submodules-update clean build release lint black proof unittests functional test unpack
26+.PHONY: help submodules submodules-update clean build release lint black proof unittests functional functional31 test unpack
27diff --git a/tests/functional/requirements.txt b/tests/functional/requirements.txt
28index bbe8435..91424f3 100644
29--- a/tests/functional/requirements.txt
30+++ b/tests/functional/requirements.txt
31@@ -1,2 +1 @@
32-git+https://github.com/openstack-charmers/zaza.git#egg=zaza
33 python-openstackclient
34diff --git a/tox.ini b/tox.ini
35index 8599e68..6862feb 100644
36--- a/tox.ini
37+++ b/tox.ini
38@@ -77,4 +77,13 @@ deps = -r{toxinidir}/tests/unit/requirements.txt
39 [testenv:func]
40 changedir = {toxinidir}/tests/functional
41 commands = functest-run-suite --keep-faulty-model {posargs}
42-deps = -r{toxinidir}/tests/functional/requirements.txt
43+deps =
44+ -r{toxinidir}/tests/functional/requirements.txt
45+ git+https://github.com/openstack-charmers/zaza.git#egg=zaza
46+
47+[testenv:func31]
48+changedir = {toxinidir}/tests/functional
49+commands = functest-run-suite --keep-faulty-model {posargs}
50+deps =
51+ -r{toxinidir}/tests/functional/requirements.txt
52+ git+https://github.com/esunar/zaza.git@fix-normalise_action_results#egg=zaza[juju-31]

Subscribers

People subscribed via source and target branches

to all changes: