-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Pin python-libjuju version to 3.1.x for juju 3.1 func tests #163
Conversation
tox.ini
Outdated
@@ -86,3 +86,4 @@ deps = | |||
commands = pytest {toxinidir}/tests/functional {posargs:-v} | |||
deps = | |||
-r {toxinidir}/tests/functional/requirements.txt | |||
juju ~= 3.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be requirements.txt? Like this we have one version in requirements.txt one for func tests and one for func31.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to keep it consistent to the other tox env for juju 2.9 tests where the libjuju version is present in tox.ini itself. There's also no libjuju version explicitly mentioned in requirements.txt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, there is only pytest-operator, which is installing juju. I still think, that we should add it to tests/functional/requirements.txt with comment why we are limiting the juju.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with adding in tests/functional/requirements.txt
is that it will be picked up for both the juju 2.9 and juju 3.1 tests. But we want both the tests to have 2 different versions of libjuju. So I think it needs to be added directly in tox.ini
itself (or we need to create 2 different requirements files).
That being said, I still think it's a good idea adding the comment with the context which I can still do in tox.ini
. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add simply juju <= 3.1
to the requirements and func test for 2.9 will simply install 2.9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, this doesn't work. It's pulling a lower v3.0.4 instead of v3.1.x which causes the func tests to fail as seen in this run. I also tried with juju~=3.1.0
forcing the right version which also seems to fail while running the lint checkers due to a dependency conflict as can be seen here. At the expense of spending too much time on troubleshooting this, I'll revert it to just adding the pin directly in the tox.ini file (along with the comment) as it was previously.
e2649b2
to
a235a1a
Compare
a235a1a
to
03b25bc
Compare
The issue has been fixed with juju/python-libjuju#1026. Closing this PR. |
This is done to fix the breaking changes with libjuju v3.3.1 as seen in this failed action run while running the juju 3.x based functional tests. This change pins the library version to the same 3.1.x used when bootstrapping the controller for the
make functional31
tests.