Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ require (
gotest.tools/v3 v3.5.2
mvdan.cc/sh/v3 v3.13.0
sigs.k8s.io/yaml v1.6.0
unikraft.com/cloud/sdk v0.0.0-20260408135319-27c8a525f615
unikraft.com/cloud/sdk v0.0.0-20260410093415-4a305de2be28
unikraft.com/x/colors v0.0.0-20260313145522-d793c36d706e
unikraft.com/x/fingerprint v0.0.0-20260126094137-ab6e717e5679
unikraft.com/x/guesstermwidth v0.0.0-20260304162956-523940cab1de
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
tailscale.com v1.94.1 h1:0dAst/ozTuFkgmxZULc3oNwR9+qPIt5ucvzH7kaM0Jw=
tailscale.com v1.94.1/go.mod h1:gLnVrEOP32GWvroaAHHGhjSGMPJ1i4DvqNwEg+Yuov4=
unikraft.com/cloud/sdk v0.0.0-20260408135319-27c8a525f615 h1:G8Y+c4bcm3bN5alfX66WhV3wrJfcIf5s6WStjIyEvlo=
unikraft.com/cloud/sdk v0.0.0-20260408135319-27c8a525f615/go.mod h1:k4SxfgQFvFmUrBPVIMlU1eYPId9lCkO9/6J9o1sL08s=
unikraft.com/cloud/sdk v0.0.0-20260410093415-4a305de2be28 h1:33typZqfrAK86//f/gdJBd5FDIV2U0a2edxFfkfQP9k=
unikraft.com/cloud/sdk v0.0.0-20260410093415-4a305de2be28/go.mod h1:k4SxfgQFvFmUrBPVIMlU1eYPId9lCkO9/6J9o1sL08s=
unikraft.com/x/colors v0.0.0-20260313145522-d793c36d706e h1:C/V6l4ut5XpcVTN5CvnskRv6NHDbyIeLdgFVLEJ9BIE=
unikraft.com/x/colors v0.0.0-20260313145522-d793c36d706e/go.mod h1:SVlAGfyQ7MwJom7m9M2w83+TrO+nJoiLxeduJAxagEo=
unikraft.com/x/fingerprint v0.0.0-20260126094137-ab6e717e5679 h1:zdvJjNkjsriS8RM46FcdgcRoCh4EYM66PGjqVgi/ups=
Expand Down
10 changes: 9 additions & 1 deletion internal/cmd/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,15 @@ func (Instance) Delete(ctx context.Context, targets []resource.Resource) error {
}
return group.DoRefs(ctx, g, keys.Refs(), func(ctx context.Context, c multimetro.MetroClient, refs group.Refs) (group.Refs, error) {
log.G(ctx).Trace().Msg("deleting instances")
instances, err := c.DeleteInstances(ctx, refs.NameOrUUIDs(), platform.DeleteInstancesOpts{})
reqs := make([]platform.DeleteInstanceRequestItem, 0, len(refs))
for _, ref := range refs.NameOrUUIDs() {
reqs = append(reqs, platform.DeleteInstanceRequestItem{
Name: ref.Name,
Uuid: ref.Uuid,
TimeoutS: new(int64(-1)),
})
}
instances, err := c.DeleteInstances(ctx, reqs)
if err != nil && !platform.ErrorContainsOnly(err, platform.APIHTTPErrorNotFound) {
return nil, err
}
Expand Down
5 changes: 0 additions & 5 deletions internal/resource/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"fmt"
"os"
"slices"
"time"

"unikraft.com/cloud/sdk/platform/group"
"unikraft.com/x/log"
Expand Down Expand Up @@ -133,10 +132,6 @@ func (s *Sandbox) Teardown(ctx context.Context) (rerr error) {
continue
}

// HACK: this is awful, but the platform can take a moment for things to
// get ready :(
time.Sleep(500 * time.Millisecond)

resources, err := r.Get(ctx, targets)
if err != nil {
var notFoundErr group.ErrRefNotFound
Expand Down
Loading