Repository navigation
[OMEGA-430] Abort omega launcher start when script and Docker image versions differ - #364
janaina-senna wants to merge 10 commits into
Conversation
|
Manual test of the matching scenario: Manual test of the mismatching scenario: |
|
Unit tests for matching and mismatching scenarios were added: |
vsbogd
left a comment
There was a problem hiding this comment.
The idea is right, but there is the excessive complexity in processing Omega versions. The problem is that instead of use bare version the code gets something like "Omega version ...." and tries to figure out version from this string. I would suggest get bare version from Python function instead.
Next question is what function to use. The function returning Omega version is
Line 221 in ee0618a
- one returns bare version or empty string
- another returns the formatted version if it is needed (personally I would not format version here at all and format it in the code which prints/sends the version instead)
Then we can get bare version using python -c ... command and postprocessing is not needed, code will be simpler overall.
|
Manual mismatch check with a local image: Scenario: Create a new image based on an existing one, such as The command exits 1 and prints the mismatch message, with the host Output: |
| if version is not None: | ||
| version = result.stdout.strip() | ||
| if version: | ||
| return version |
There was a problem hiding this comment.
@janaina-senna Is the bare version format intended for all existing omega_version() consumers? In particular, the MeTTa (version) skill and memory-export metadata now receive v… instead of the previous Omega version=v… format.
If not, should display-facing call sites format the value explicitly?
There was a problem hiding this comment.
omega_version() is meant to return the bare version, or an empty string, for every caller. That follows @vsbogd's review: keep the bare value in the function, and add the Omega version= prefix only where the version is printed.
The launcher does that for --version and for the mismatch message, which keeps the existing Omega version=$(git describe …) output. The MeTTa (version) skill calls omega_version() directly, so it now returns the version number (v…). Memory export stores that same bare string in OMEGA_VERSION. Neither of those sites adds the prefix.
jazzbox35
left a comment
There was a problem hiding this comment.
Approved -- next step should be QA
|
Tested: image built from this PR at 8ee46cc ( What I checked
Images up to v0.1.19 are never checkedscripts/omega:550-560 looks for the version only under Without a version of its own the launcher skips the checkPiped into bash the way the README installs Omega, The same happens in a clone when The piped launcher runs
|
…cribe and no longer imports helper.py
|
The piped installer cannot see the URL it was downloaded from, and it has no
only warns and still starts the image. Should we record the release version inside cc: @vsbogd |
We don't have any version imprinting into the files from the repository during release step at the moment. I don't see an easy way of adding it. When release is created via GitHub Release screen the release job is called after the tag is created. Thus there is no way to commit the release version under the same tag. The only way I think is publishing start script separately (out of GitHub repository or may be in a dedicated branch of the repository) and imprint version during such publishing. This requires changes in CI job. |
Thus we in theory can add the dedicated branch (let's say |
|
@TossSky Ready for review. |
|
Tested: 9cdcbfe ( What I checked
The same commit is refused when
|
Description
Abort
scripts/omega start(and the interactive bootstrap) when the host launcher version and the Docker image version are both known and do not match.The check runs after
docker pulland beforedocker rm -f omega. Host version comes fromomega_version(); which returns the baregit describe --tags --dirty --alwaysstring, or an empty string when unknown. The image version is read fromOmega/version, written at image build. If that file is empty, the same function runs inside the image withpython3 -c. A trailing-dirtysuffix is ignored, so a locally dirty checkout of the same tag is not a false mismatch.If either version is empty (typical
curl | bash, with no git metadata), the script warns and continues, so the documented pipe-install path still works.The README now states that the launcher and image must be the same git tag.
How Has This Been Tested?
bash -n scripts/omega./scripts/omega --versiontests/test_omegaclaw_launcher.py:startand still issuesdocker rm/docker run.Checklist