Conversation
Signed-off-by: Artem Lytvyn <alytvyn@redhat.com>
|
Is this unique to the vm driver or are others already using ID? I thought we were standardizing on workspace+sandbox_name for sandbox management. @drew can you weigh in? |
|
hey @johntmyers, this is not unique to vm driver, docker (#3240) and mxc (#3278) drivers had the same weakness and got the same fix: |
|
We have this ticket #3050 to standardize how we reference sandboxes across the product. Lets prefer that ticket and associated pr. We should try and prefer workspace+name rather than id I think. |
|
Thanks @drew, I read through #3272. My understanding is that it standardizes the public gateway RPCs on workspace + name while keeping sandbox IDs internal at the compute-driver boundary, and it doesn't touch Two options, happy with either:
I'd lean toward 1 now and 2 as the follow-up, mainly so docker/vm/mxc don't sit in three different states while #3050 is in flight. |
|
Label |
|
/ok to test 7d1c9b8 |
drew
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
@drew, I checked your concern about preferring workspace plus sandbox name against the merged #3272 change and current main. The public gateway RPCs now use workspace and name, while the internal compute-driver lifecycle requests deliberately retain a stable sandbox ID plus runtime name, so @letv1nnn's narrow VM-driver fix is complementary rather than competing. The independent code review found no blocking defects.
Blocking findings:
- No blocking findings remain
Carried findings:
- None
Non-blocking suggestions:
- None
Gator metadata
- Validation: Concentrated VM-driver correctness and cross-workspace data-loss fix linked to #3254; the merged public API standardization does not remove the internal ID-based driver boundary.
- Docs: Fern docs are not needed because this corrects internal driver resolution without changing the supported user-facing workflow.
- Checks: Current-head Branch Checks are queued, Helm Lint is running, and required pipeline monitoring is active.
- E2E:
test:e2eapplied;/ok to testcreatedpull-request/3305, and Branch E2E Checks are running. - Head SHA:
7d1c9b86b28e0ed2c202175e64028ba19c63671c - Base SHA:
5b9daab9351b1e053f9a5e0ce4c899f5d3f674b0 - Merge base SHA:
bcf96e4900004e07253d72332a6619f7e2c4e7d7 - Patch ID:
cf9176aee04b78990c599f462943c3b5f7be34c7 - Gator payload:
9 - Review mode:
initial - Previous reviewed SHA: none
- Review budget exhausted: no
- Maintainer decision required: no
- Next state:
gator:watch-pipeline
Summary
stop_sandbox,start_sandbox, anddelete_sandboxon the VM driver preferred the suppliedsandbox_idbut fell back to matching onsandbox_namewhenever that id was absent from the registry. Because sandbox names are unique per workspace rather than globally, that fallback could resolve to a same-named sandbox in a different workspace. Lifecycle resolution now treats a supplied id as authoritative.Related Issue
Fixes #3254
Changes
stop_sandbox,start_sandbox, anddelete_sandboxselect the resolution branch on whether the caller supplied asandbox_id, not on whether that id happened to be present. A supplied id resolves on its own or reports absence.resolve_record_idhelper, replacing the same logic copy-pasted across the three methods.FailedPreconditioninstead of resolving byHashMapiteration order.insert_named_recordsets a record's id, name, and workspace independently.get_sandboxis unchanged: it already gates its name fallback onsandbox_id.is_empty(), and it is read-only.Testing
mise run pre-commitpassesChecklist