Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit898bbaf

Browse files
committed
fixup! fix provisioner, add resource test
1 parentf35cba4 commit898bbaf

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

‎provisioner/terraform/resources.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package terraform
33
import (
44
"context"
55
"fmt"
6-
"slices"
76
"strings"
87

98
"github.com/awalterschulze/gographviz"
@@ -622,17 +621,6 @@ func ConvertState(ctx context.Context, modules []*tfjson.StateModule, rawGraph s
622621
}
623622
}
624623
}
625-
// Stable order.
626-
for_,agents:=rangeresourceAgents {
627-
for_,agent:=rangeagents {
628-
slices.SortStableFunc(agent.Devcontainers,func(a,b*proto.Devcontainer)int {
629-
ifn:=strings.Compare(a.WorkspaceFolder,b.WorkspaceFolder);n!=0 {
630-
returnn
631-
}
632-
returnstrings.Compare(a.ConfigPath,b.ConfigPath)
633-
})
634-
}
635-
}
636624

637625
// Associate metadata blocks with resources.
638626
resourceMetadata:=map[string][]*proto.Resource_Metadata{}

‎provisioner/terraform/resources_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,6 +1403,9 @@ func sortResources(resources []*proto.Resource) {
14031403
sort.Slice(agent.Scripts,func(i,jint)bool {
14041404
returnagent.Scripts[i].DisplayName<agent.Scripts[j].DisplayName
14051405
})
1406+
sort.Slice(agent.Devcontainers,func(i,jint)bool {
1407+
returnagent.Devcontainers[i].WorkspaceFolder<agent.Devcontainers[j].WorkspaceFolder
1408+
})
14061409
}
14071410
sort.Slice(resource.Agents,func(i,jint)bool {
14081411
returnresource.Agents[i].Name<resource.Agents[j].Name

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp