chore(ods): remove unused Registry.Lease wrapper
Description
This PR removes Registry.Lease from tools/ods/internal/devstack/ports.go. It was a one-line wrapper that called LeaseFor(root, "", requests). Its last production caller, leasePorts in lifecycle.go, switched to LeaseFor in #16285. After that change, only tests called Lease.
The tests now call LeaseFor(root, "", ...) directly, so their behavior does not change. The files are ports_test.go, launch_test.go, ports_live_test.go, service_runner_test.go and cmd/stack_ls_test.go.
#16263 removed NewConfigFromEnv for the same reason.
How Has This Been Tested?
gofmt,go vet ./...andgo vet -tags live,integration ./...pass.go test ./internal/devstack/passes.- In
go test ./cmd/, onlyTestRunCI_failuresfails. #16285 reports that this test also fails on a clean main in this environment. - Pre-commit (
golangci-lint) passes.
Additional Options
- [Optional] Please cherry-pick this PR to the latest release version.
Link to Devin session: https://app.devin.ai/sessions/a3cb68152476440ab90f20b4ed1d644b
Open in Devin Desktop: https://app.devin.ai/desktop/session/a3cb68152476440ab90f20b4ed1d644b?variant=devin
Summary by cubic
Removes the unused Registry.Lease wrapper from tools/ods/internal/devstack/ports.go. Its last production caller switched to LeaseFor in #16285, and the affected tests now call LeaseFor(root, "", ...) directly with no behavior change.
Summary by CodeRabbit
-
Refactor
- Consolidated port lease handling through the state-aware lease interface.
- Removed the legacy lease method; existing lease scenarios continue to support reclamation, replacement, release, and port selection.
-
Tests
- Updated lease-related coverage to use the current interface while preserving validation of stale leases, durable leases, foreign listeners, and busy preferred ports.