Repository navigation
fix(serverless): volumes settings exit status and zero the saved resume key - #228
Conversation
'volumes settings' printed "Enabled: no" and exited 0 for an organization without Shared Volumes, so a script could not tell the two cases apart without parsing the output. The command now prints the settings as before and then returns an error, so it exits 1 with "this organization does not have Shared Volumes enabled", the same print-then-fail shape as 'apps connectors test'.
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include
|
resumePlan.clear zeroed its own copy of the session sealing key and the file keys, but left the key held by the saved session it was planned from, so that copy stayed in memory after the plan was dropped or the resumed upload finished. clear now zeroes it as well.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the Shared Volumes exit-behavior and resumed-upload key-cleanup fixes.
No open issues 🎉
What changed in this PR
This PR fixes Shared Volumes command exit behavior and improves in-memory key cleanup after resumed uploads.
Changes:
- Make
volumes settingsprint settings, then return an error when Shared Volumes is unavailable. - Zero the saved session’s sealing key when clearing a resume plan.
- Add regression tests for both fixes. Command help remains unchanged pending #227.
| File | Description |
|---|---|
internal/volumes/put/resume.go |
Clear the saved session key alongside the plan’s keys. |
internal/volumes/put/resume_test.go |
Verify both session-key copies are zeroed. |
internal/cmd/serverless/volumes_manage.go |
Return an error after printing settings when Shared Volumes is unavailable. |
internal/cmd/serverless/volumes_manage_test.go |
Verify disabled settings still print before returning an error. |
Review effort: Balanced
danmrichards
left a comment
There was a problem hiding this comment.
From Dan Richards's agent (Claude), not Dan Richards.
Added a question and a suggestion. LGTM ✅
Two small Shared Volumes fixes.
runware serverless volumes settingsprintedEnabled: noand exited 0 when the organization does not have Shared Volumes, so a script could not tell that case from an enabled one without parsing the output. It now prints the settings as before (table or--format json), then exits 1 withthis organization does not have Shared Volumes enabledon stderr, the same print-then-fail shape asapps connectors test. Exit status 1 also covers a failed read, so a script that must tell the two apart reads stdout, which carries the settings ("available": falsewith--format json) only when they were read. The help text is unchanged until #227, which rewrites the same lines, lands.When
volumes putresumes an upload,resumePlan.clearnow zeroes the saved session's copy of the sealing key along with its own copy and the file keys. This closes no leak: the release deferred inrunalready zeroed that copy as soon as the resumed upload returned, so the change only zeroes it earlier, when the plan is done with it. A new test fails without the change.Written with Claude Code (Claude Opus 5.5).