Skip to content

fix: bump snap-helpers to fix SnapCtl pipe deadlock - #43

Open
zhhuabj wants to merge 2 commits into
canonical:stable/2024.1from
zhhuabj:2024.1_sync_snap_helpers_lp2162621
Open

zhhuabj wants to merge 2 commits into
canonical:stable/2024.1from
zhhuabj:2024.1_sync_snap_helpers_lp2162621

Conversation

@zhhuabj

@zhhuabj zhhuabj commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Update snap-helpers from 46803aa9 to 76f8166 to pull in the upstream fix for the SnapCtl.run() pipe deadlock (openstack-charmers/snap-helpers#26).

The configure hook reads snap config via snaphelpers, which can deadlock when snapctl output exceeds the OS pipe buffer.

Partial-bug: #2162621
(cherry picked from commit 38924e1)

Fix CI lint failure caused by upstream Ruff release introducing new rules (LOG015/C402) on unpinned tox environment. Pinned ruff in tox.ini to <=0.14.6 to match the version locked in uv.lock.

Update snap-helpers from 46803aa9 to 76f8166 to pull in the upstream
fix for the SnapCtl.run() pipe deadlock (openstack-charmers/snap-helpers#26).

The configure hook reads snap config via snaphelpers, which can deadlock
when snapctl output exceeds the OS pipe buffer.

Partial-bug: #2162621
Signed-off-by: Zhang Hua <joshua.zhang@canonical.com>
(cherry picked from commit 38924e1)
The pep8 testenv in tox.ini currently specifies unpinned 'ruff' under
its deps, which causes tox to install the latest available version
from PyPI during CI runs (currently ruff 0.17.x).

Recent ruff releases introduced newer and stricter linter rules by
default (such as LOG015 flag for root logger calls and C402 for
generator rewrites), which fail against the stable/2024.1 codebase
despite no python code changes in backports.

In contrast, uv.lock pins ruff to 0.14.6, under which the entire
codebase passes all lint checks cleanly.

Pin ruff to <=0.14.6 in [testenv:pep8] to align the tox linting
environment with the project lockfile and protect stable branch CI
from upstream tool bitrot.

Signed-off-by: Zhang Hua <joshua.zhang@canonical.com>
@hemanthnakkina

Copy link
Copy Markdown
Collaborator

@zhhuabj Isnt it better to fix issues instead of pinning ruff? Are they major changes.
If they are major can u create a bug to unpin ruff back with the fix

@zhhuabj

zhhuabj commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

@zhhuabj Isnt it better to fix issues instead of pinning ruff? Are they major changes. If they are major can u create a bug to unpin ruff back with the fix

Hi @hemanthnakkina , Thanks for raising this. I checked the ruff findings: there are 45 LOG015 violations across two core modules and one C402 violation. The fixes are straightforward, but the cleanup is broader than this stable-branch backport and unrelated to the SnapCtl deadlock fix, so I’ve kept the ruff pin for this PR and filed a follow-up bug to fix the violations and remove the pin: #45

Could you please approve this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants