Skip to content

Add paude upgrade command to upgrade sessions in place#130

Merged
bbrowning merged 5 commits intomainfrom
paude-upgrade
Mar 26, 2026
Merged

Add paude upgrade command to upgrade sessions in place#130
bbrowning merged 5 commits intomainfrom
paude-upgrade

Conversation

@bbrowning
Copy link
Copy Markdown
Owner

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

bbrowning and others added 5 commits March 25, 2026 17:46
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>
@bbrowning bbrowning merged commit ae9608c into main Mar 26, 2026
6 checks passed
@bbrowning bbrowning deleted the paude-upgrade branch March 26, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant