Repository navigation
fix(receptorctl): ignore leading v when comparing versions - #1612
Merged
PabloHiro merged 1 commit intoOct 22, 2026
Merged
Conversation
Contributor
PabloHiro
approved these changes
Oct 20, 2026
PabloHiro
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thank you for the contribution @majidninja !
matoval
approved these changes
Oct 20, 2026
Contributor
|
@majidninja can you sign the commits in this PR? We require signed commits. |
majidninja
force-pushed
the
fix/receptorctl-version-v-prefix
branch
from
October 21, 2026 10:30
9c0b59a to
e9c1090
Compare
receptor reports its version from the git tag (v1.6.5), but receptorctl's package version is 1.6.5. The mismatch check compared the raw strings, so every receptorctl command warned that the two were different versions even when they were the same release. Strip an optional leading "v" from both sides before comparing. The printed versions are unchanged. Fixes ansible#1610 Signed-off-by: Majid Ali <143703501+majidninja@users.noreply.github.com>
Contributor
Please follow this guide: |
majidninja
force-pushed
the
fix/receptorctl-version-v-prefix
branch
from
October 21, 2026 11:53
e9c1090 to
b2c0b6f
Compare
Contributor
Author
|
@PabloHiro Done, the commit is signed now. Since this required a force-push, you may need to approve it again. Thanks! |
|
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.



Fixes #1610
receptor gets its version from
git describe --tagsin the Makefile, so it reportsv1.6.5, whileimportlib.metadata.version("receptorctl")gives1.6.5.cli()compared the two strings directly, so you got the "different versions" warning on every command even with matching releases.I added a small
versions_match()helper that strips an optional leadingvfrom both sides and used it for the check. Whatreceptorctl versionprints stays the same.Tests: a parametrized test for
versions_match(), plus a CLI test that swapsReceptorControlfor a stub and checks that the warning is gone forv1.6.5vs1.6.5and still shows for a real mismatch. Thevcase fails ondevelwithout the fix. Ran the fullreceptorctl/testssuite against a locally built receptor: 38 passed, 5 skipped.test_tcp_control_service_tlsandtest_workunit_cmd_cancel(nokillallon my box) fail the same way without my change.ruff checkandruff format --checkare clean.Summary by CodeRabbit