Skip to content

fix(LinuxTentacleE2E): J.L.E.7.6 — write FULL pre-release version to version.txt (no stripping)

Placeholder ppxd requested to merge phase12.L.E.7.6-version-txt-full-suffix into main

Summary

Sixth iteration of the J.L.E.7 Linux full-lifecycle test debug loop. The first runner caught five bugs in series:

Iteration Bug Fix
J.L.E.7.1 SERVICE_NAME defaulted to squid-tentacle (not test name) Load template + manual substitution
J.L.E.7.2 HEALTHCHECK_RETRIES=1 too tight for python3 spawn Bump to 10
J.L.E.7.3 python3 couldn't re-bind port 8080 (TIME_WAIT) allow_reuse_address=True on TCPServer
J.L.E.7.4 Marker asserted absent — diagnostic blind Add install-dir dump on assertion failure
J.L.E.7.5 .sh version probe (timeout 5) → SIGTERM → trap-cleanup rm marker Add version subcommand fast-path in test service
J.L.E.7.6 (this PR) Stripped version.txt 2.0.0 ≠ TARGET_VERSION 2.0.0-test → rollback Stop stripping pre-release suffix

Root cause

upgrade-linux-tentacle.sh's Phase B post-restart sanity check is exact-string match:

if [ "$RUNNING_VERSION" != "$TARGET_VERSION" ]; then
    rollback_to_v1
fi

The test was writing 2.0.0 (stripped) to version.txt while the upgrade strategy passed 2.0.0-test (full) as TARGET_VERSION. Mismatch → rollback fired → marker still 1.0.0 → assertion failed.

Runner output that caught this:

::warning:: New binary reports 2.0.0 but target was 2.0.0-test.
::warning:: Service is healthy but binary reports version '2.0.0' (expected '2.0.0-test').

Fix

  • LinuxLifecycleContext.BuildV2BundleTarGz — write targetVersion verbatim (no .Split('-')[0])
  • TentacleLinuxUpgradeLifecycleE2ETests.E1h_FullLifecycle — assert marker contains "2.0.0-test" (failure message also distinguishes the stripped-version diagnostic case for future regressions)

Production parity

Real Squid.Tentacle.exe version emits the full InformationalVersion (including -test, -rc.1, -beta, etc.). Stripping was a test-only convenience that diverged from the contract the .sh enforces.

Test plan

  • CI Linux runner: E1.h-Linux full lifecycle now passes end-to-end
  • Marker file at end-of-run contains 2.0.0-test (not 1.0.0, not 2.0.0)
  • last-upgrade.json.targetVersion == "2.0.0-test" (already passing in J.L.E.7.5)
  • No rollback warnings in .sh output

🤖 Generated with Claude Code

Merge request reports

Loading