Repository navigation
fix(setup): report the bare version in setup --json - #28
Open
HusseinAdeiza wants to merge 1 commit into
Open
HusseinAdeiza wants to merge 1 commit into
HusseinAdeiza wants to merge 1 commit into
Conversation
Cache files are namespaced by repository, so the version cannot be recovered by stripping a fixed prefix off the filename. On the contract-header auto-detect path, where no explicit --version is set, `genvm-lint setup --json` reported the repo slug along with the version (`genlayerlabs-genvm-manager-v0.6.0-rc7`). _cached_bundle_version() already parses this correctly, so use it. Fixes genlayerlabs#27
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What
genvm-lint setup --jsonreported the repository slug along with the version.{"ok": true, "extraPaths": [], "version": "genlayerlabs-genvm-manager-v0.6.0-rc7"}The version was recovered by stripping a fixed
genvm-universal-prefix off the cachefilename, but cached bundles are namespaced by repository
(
genvm-universal-genlayerlabs-genvm-manager-v0.6.0-rc7.tar.xz), so that leaves theslug behind.
Why this path
Only reachable when no explicit
--versionis passed and--contractis given.Without
--contract,setupresolves the latest version up front, soversionisalready set and the filename is never parsed. The contract-header auto-detect path is
the one that has to recover the version from the cached bundle.
_cached_bundle_version()invalidate/artifacts.pyalready parses this correctly(prefix + suffix aware), so the fix is to use it rather than re-deriving the name.
Testing
tests/test_setup_json.py— 2 new tests, verified RED against the old expression(
assert 'genlayerlabs...er-v0.6.0-rc7' == 'v0.6.0-rc7') and GREEN after.pytest tests/ -q— 116 passed on 3.12 and on 3.10 (both CI matrix entries).ruff check tests/test_setup_json.pyclean;cli.pypre-existing findings drop 9 → 8.Found while looking at #27. The E101 404 there does not reproduce on
v0.11-dev:RUNNER_BUNDLE_ASSETSalready triesgenvm-runners-all.tar.xzfirst, and both bundlenames resolve against the current releases in
genlayerlabs/genvmandgenlayerlabs/genvm-manager.