Add paude upgrade command to upgrade sessions in place#130
Merged
Conversation
Allows upgrading a session's container image to the current paude version while preserving the workspace volume and data. Tracks version via labels on containers/StatefulSets and displays a VERSION column with outdated indicator (*) in `paude list`. Key changes: - New `paude upgrade NAME` command with `--rebuild` flag - Version tracking labels (paude.io/version, gpu, yolo) on containers - Session.version and SessionConfig.reuse_volume fields - Registry paude_version field with backward compatibility - PaudeConfig.has_customizations property to reduce duplication - Guard against volume deletion on proxy failure during upgrade - Preserve unrestricted network state (no proxy) across upgrades Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests create sessions with a simulated old version label, write a marker file to the PVC, run the upgrade, and verify that volume content, session labels (agent, yolo, domains), and version are all correctly preserved. Shared OpenShift test fixtures (run_oc, test_namespace, openshift_backend, cleanup) are consolidated in conftest.py. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…arker The /pvc/workspace directory is created by entrypoint-session.sh at runtime, but test containers use `sleep infinity` as entrypoint so the directory never exists. Create it explicitly before writing, matching the pattern used by existing tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Podman test patched `paude.cli.upgrade.ImageManager` and `build_mounts`, but these are local imports inside `_upgrade_podman()` so they don't exist as module-level attributes. Patch the defining modules instead. OpenShift test used jsonpath to read a label with dots in the key (`paude.io/version`), but dots are JSONPath path separators, causing empty results. Use `-o json` with `json.loads()` instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ad of property `_syncer` is a read-only @Property on OpenShiftBackend, so patch.object fails with "no setter". Patch `_syncer_instance` (the backing attribute) instead, which the property getter returns when non-None. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Allows upgrading a session's container image to the current paude version
while preserving the workspace volume and data. Tracks version via labels
on containers/StatefulSets and displays a VERSION column with outdated
indicator (*) in
paude list.Key changes:
paude upgrade NAMEcommand with--rebuildflagCo-Authored-By: Claude Opus 4.6 noreply@anthropic.com