build(deps): use released valkey-glide instead of the git fork - #98
Merged
Conversation
Both pyprojects pinned valkey-glide to skourta/valkey-glide@add-build-rs-to-async-client
(a15d4c3, a Feb-2026 dev snapshot), so every spread job compiled it from Rust source:
272 s of the ~274 s tox commands_pre. The reason expired — upstream PR 5124 ("Python: add
mTLS support") merged 2026-01-08 and ships in every release since 2.4.0. Move both to
`valkey-glide = "^2.5"` (locks resolve 2.5.1). Measured: 272 s -> 0.6 s warm, 11.2 s cold,
across 34 integration jobs per CI run.
Two things the switch needs on top of the version bump:
valkey-glide's wheels ship two top-level packages, `glide` and `glide_shared`, but its
sdist ships only `glide` — and `glide/_ffi_instance.py` imports `glide_shared._glide_ffi`.
`glide_shared` is not published separately, and no sdist from 2.2.10 to 2.5.1 contains it.
charmcraft's poetry plugin installs with `--no-binary=:all:`, so the glide-runner charm
built a glide that died on `ModuleNotFoundError: No module named 'glide_shared'`, failing
every hook from `install` onward. Pin that one package to its wheel with
`poetry-pip-extra-args: ["--only-binary=valkey-glide"]`, which is appended after the
plugin's own flag and wins because pip's per-package only_binary beats `:all:`.
glide also rewrites server error codes on the RequestError path: Valkey replies
`NOPERM No permissions to access a key`, glide >=2.4 renders `PermissionDenied: ...`.
Accept either spelling in test_client_relation.py so the assertion tracks the denial
rather than the client's wording. Connection-level errors (ClosingError) still quote the
server verbatim, so the NOAUTH/WRONGPASS checks in helpers.py are unaffected.
Verified on VM/lxd: test_charm.py 5/5 and test_client_relation.py 8/8, the latter
including test_mtls and test_certificate_authentication. k8s was not exercised locally.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
delgod
marked this pull request as ready for review
August 20, 2026 17:25
Mehdi-Bendriss
approved these changes
Aug 20, 2026
Mehdi-Bendriss
left a comment
Contributor
There was a problem hiding this comment.
Thanks Mykola! This was a long awaited fix.
@skourta missed your window there :D
skourta
approved these changes
Aug 21, 2026
reneradoi
approved these changes
Aug 21, 2026
reneradoi
left a comment
Contributor
There was a problem hiding this comment.
Very nice, this was still on the to-do list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Swaps the
valkey-glidegit fork for the released PyPI package —^2.5in both pyprojects (locks resolve 2.5.1).The fork existed for upstream PR 5124 (mTLS), which merged Jan 2026 and has shipped since 2.4.0. It costs 272 s of Rust build on every spread job, ~34 jobs per CI run.
poetry install --only integration: 272 s → 0.6 s.Two gotchas, both handled here
The sdist is incomplete. Wheels ship
glideandglide_shared; every sdist from 2.2.10 to 2.5.1 ships onlyglide— which importsglide_shared. charmcraft installs with--no-binary=:all:, so glide-runner failed every hook withModuleNotFoundError: No module named 'glide_shared'. Fixed by pinning that one package to its wheel:poetry-pip-extra-args: ["--only-binary=valkey-glide"].glide renames error codes. Valkey replies
NOPERM, glide ≥2.4 rendersPermissionDenied. Two assertions intest_client_relation.pynow accept either.NOAUTH/WRONGPASSstill arrive verbatim viaClosingError, sohelpers.pyis untouched.