From 52ed0866445fd8f458f7dabcc43642cc976f92f8 Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Mon, 16 May 2022 17:11:53 -0500 Subject: [PATCH] Change TargetIndex to only search by uuid Note this reverses a change made in https://github.com/hashicorp/vagrant-ruby/pull/180 to attempt to address issues losing track of machines. Further testing is in order to verify we haven't re-broken that, but after discussion we agreed this is the correct behavior for the index. --- internal/core/target_index.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/internal/core/target_index.go b/internal/core/target_index.go index 54c192373..bbbe37011 100644 --- a/internal/core/target_index.go +++ b/internal/core/target_index.go @@ -47,15 +47,7 @@ func (t *TargetIndex) Get(uuid string) (entry core.Target, err error) { }, }) if err != nil { - // Search name if not found by uuid - result, err = t.client.FindTarget(t.ctx, &vagrant_server.FindTargetRequest{ - Target: &vagrant_server.Target{ - Name: uuid, - }, - }) - if err != nil { - return - } + return } return t.loadTarget(&vagrant_plugin_sdk.Ref_Target{ ResourceId: result.Target.ResourceId,