Repository navigation
❇️ Replace hardcoded operator version with dynamic GitHub tag detection - #177
Merged
Merged
Conversation
pdettori
reviewed
Sep 4, 2025
Member
There was a problem hiding this comment.
Looks like we added git to the list of pre-reqs - I think we need to add that to https://github.com/kagenti/kagenti/blob/f4f34da78095318fa43ac03f4e8e8830d3262802/kagenti/installer/app/config.py#L34
Contributor
Author
There was a problem hiding this comment.
Looks like the minimum version of Git that supports git ls-remote --sort is Git 2.18. What should be used for the max? The latest git (2.51.0)?
Member
There was a problem hiding this comment.
Yes or even better we can also use a very large number since we are more interested in the minimum version (e.g. 2.99.0 )
added 3 commits
September 5, 2025 13:57
Signed-off-by: Jarek Cwiklik <[email protected]>
Signed-off-by: Jarek Cwiklik <[email protected]>
Signed-off-by: Jarek Cwiklik <[email protected]>
cwiklik
force-pushed
the
use-operator-version-detector
branch
from
September 5, 2025 18:03
a52acb4 to
8f21602
Compare
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.
Summary
Fixes Kagenti installer which used a hardcoded operator version. The installer now automatically detects and uses the latest operator release from the kagenti-operator repository.
Problem
Installer contained hardcoded operator version (ex. 0.2.0-alpha.4)
Required manual updates every time a new operator version was released
Risk of deploying outdated operator versions in new installations
Created operational overhead for maintenance
Solution
Implemented dynamic version detection that:
Queries the kagenti-operator repository for the latest semantic version tag
Uses
git ls-remoteto avoid pull limit errorChanges Made
Added
get_latest_operator_version()functionUses
git ls-remote --tags --sort=-version:refnameto query remote tagsParses semantic versions using the packaging library
Returns the highest semantic version found
Fixes #171