Skip to content
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

Missing websockets pin in libjuju 2.9.49.0 #1226

Closed
dragomirp opened this issue Nov 28, 2024 · 3 comments
Closed

Missing websockets pin in libjuju 2.9.49.0 #1226

dragomirp opened this issue Nov 28, 2024 · 3 comments
Labels
hint/2.9 going on 2.9 branch kind/bug indicates a bug in the project

Comments

@dragomirp
Copy link

Description

Related to #1184

A pin for websockets was added to libjuju 3.5, but not to libjuju 2.9, so 2.9.49.0 will fail if websockets pin is not maintained elsewhere.

It fails with:

  File "/home/runner/work/postgresql-operator/postgresql-operator/.tox/integration/lib/python3.10/site-packages/juju/client/connection.py", line 430, in close
    if self._ws and not self._ws.closed:
AttributeError: 'ClientConnection' object has no attribute 'closed'. Did you mean: 'close'?

CI runs can be seen here

Urgency

Annoying bug in our test suite

Python-libjuju version

2.9.49.0

Juju version

2.9.51

Reproduce / Test

# on juju 2.9 with libjuju 2.9.49.0
# python -m asyncio
import asyncio
from juju.model import Model
model = Model()
await model.connect_current()
@dimaqq
Copy link
Contributor

dimaqq commented Nov 29, 2024

I can release a 2.9.49.x, though you'll still have to update your CI workflow, because today it forces an exact version:

poetry add --lock --group integration juju@'==2.9.49.0

@dragomirp
Copy link
Author

I can release a 2.9.49.x, though you'll still have to update your CI workflow, because today it forces an exact version:

poetry add --lock --group integration juju@'==2.9.49.0

Hi, the renovate bot should move the CI pin for us once the new version is released, so that should be automatically handled on our end.

@dragomirp dragomirp changed the title Missing websockets pin lin libjuju 2.9.49.0 Missing websockets pin in libjuju 2.9.49.0 Dec 1, 2024
@dimaqq dimaqq added the hint/2.9 going on 2.9 branch label Dec 1, 2024
@dimaqq
Copy link
Contributor

dimaqq commented Dec 2, 2024

Juju 2.9
Currently in Security Fix Only support.

The same applies to python-libjuju.

In other words, the fact that juju >= 3.6 release makes using juju < 3 less convenient is just something we'll have to live with.

I would propose one of the following work-arounds, in reverse order of pedantry:

  1. separate lock files for juju 2.x and 3.x
    a. clear pins for juju and dependencies
    b. independent Python version restriction
  2. list websockets < 14 dependency directly for both juju 2.x and 3.x

@dimaqq dimaqq closed this as completed Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hint/2.9 going on 2.9 branch kind/bug indicates a bug in the project
Projects
None yet
Development

No branches or pull requests

2 participants