From e5afe71a906d27dc0a716678c1b852c59493df55 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Wed, 26 Apr 2023 17:45:27 -0700 Subject: [PATCH 01/20] Update alias tests to use alias specs When support for alias computation was implemented in the engine in a5233f461733fd6b90959eec191126cdb8b17966, the existing alias tests in `pulumi_test.go` were duplicated to test the new spec-based functionality. The existing tests are in `TestAliasURNs` and new duplicated tests were added in `TestAliases`. However, the new tests used the spec's `URN` field rather than the new spec fields like `Name` and `Type`, so we're missing some coverage of these fields. This commit updates the duplicated spec tests in `TestAliases` to use the new alias spec fields rather than `URN`, where appropriate. --- pkg/engine/lifecycletest/pulumi_test.go | 53 ++++++++++++------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/pkg/engine/lifecycletest/pulumi_test.go b/pkg/engine/lifecycletest/pulumi_test.go index 12a1d8176a1f..5dab1dc8cc92 100644 --- a/pkg/engine/lifecycletest/pulumi_test.go +++ b/pkg/engine/lifecycletest/pulumi_test.go @@ -1573,7 +1573,7 @@ func TestAliases(t *testing.T) { snap = updateProgramWithResource(snap, []Resource{{ t: "pkgA:index:t1", name: "n2", - aliases: []resource.Alias{{URN: "urn:pulumi:test::test::pkgA:index:t1::n1"}}, + aliases: []resource.Alias{{Name: "n1"}}, }}, []display.StepOp{deploy.OpSame}, false) // Ensure that rename produces Same with multiple aliases @@ -1581,8 +1581,8 @@ func TestAliases(t *testing.T) { t: "pkgA:index:t1", name: "n3", aliases: []resource.Alias{ - {Name: "n2", Type: "pkgA:index:t1", Stack: "test", Project: "test"}, - {Name: "n1", Type: "pkgA:index:t1", Stack: "test", Project: "test"}, + {Name: "n2"}, + {Name: "n1"}, }, }}, []display.StepOp{deploy.OpSame}, false) @@ -1592,7 +1592,7 @@ func TestAliases(t *testing.T) { name: "n3", aliases: []resource.Alias{ {URN: "urn:pulumi:test::test::pkgA:index:t1::n2"}, - {Name: "n1", Type: "pkgA:index:t1", Stack: "test", Project: "test"}, + {Name: "n1"}, }, }}, []display.StepOp{deploy.OpSame}, false) @@ -1602,9 +1602,8 @@ func TestAliases(t *testing.T) { name: "n1", aliases: []resource.Alias{ {URN: "urn:pulumi:test::test::pkgA:index:t1::n3"}, - {Name: "n2", Type: "pkgA:index:t1", Stack: "test", Project: "test"}, + {Name: "n2"}, }, - aliasURNs: []resource.URN{"urn:pulumi:test::test::pkgA:index:t1::n3"}, }}, []display.StepOp{deploy.OpSame}, false) // Ensure that removing aliases is okay (once old names are gone from all snapshots) @@ -1618,7 +1617,7 @@ func TestAliases(t *testing.T) { t: "pkgA:index:t2", name: "n1", aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1::n1"}, + {Type: "pkgA:index:t1"}, }, }}, []display.StepOp{deploy.OpSame}, false) @@ -1627,8 +1626,8 @@ func TestAliases(t *testing.T) { t: "pkgA:othermod:t3", name: "n1", aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1::n1"}, - {URN: "urn:pulumi:test::test::pkgA:index:t2::n1"}, + {Type: "pkgA:index:t1"}, + {Type: "pkgA:index:t2"}, }, }}, []display.StepOp{deploy.OpSame}, false) @@ -1637,9 +1636,9 @@ func TestAliases(t *testing.T) { t: "pkgA:othermod:t3", name: "n1", aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1::n1"}, - {URN: "urn:pulumi:test::test::pkgA:othermod:t3::n1"}, - {URN: "urn:pulumi:test::test::pkgA:index:t2::n1"}, + {Type: "pkgA:index:t1"}, + {Type: "pkgA:othermod:t3"}, + {Type: "pkgA:index:t2"}, }, }}, []display.StepOp{deploy.OpSame}, false) @@ -1657,7 +1656,7 @@ func TestAliases(t *testing.T) { resource.PropertyKey("x"): resource.NewNumberProperty(42), }, aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:othermod:t3::n1"}, + {Type: "pkgA:othermod:t3", Name: "n1"}, }, }}, []display.StepOp{deploy.OpUpdate}, false) @@ -1669,7 +1668,7 @@ func TestAliases(t *testing.T) { resource.PropertyKey("x"): resource.NewNumberProperty(1000), }, aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t4::n2"}, + {Type: "pkgA:index:t4", Name: "n2"}, }, }}, []display.StepOp{deploy.OpUpdate}, false) @@ -1681,7 +1680,7 @@ func TestAliases(t *testing.T) { resource.PropertyKey("forcesReplacement"): resource.NewNumberProperty(1000), }, aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t5::n3"}, + {Type: "pkgA:index:t5", Name: "n3"}, }, }}, []display.StepOp{deploy.OpReplace, deploy.OpCreateReplacement, deploy.OpDeleteReplaced}, false) @@ -1695,7 +1694,7 @@ func TestAliases(t *testing.T) { }, deleteBeforeReplace: true, aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t6::n4"}, + {Type: "pkgA:index:t6", Name: "n4"}, }, }}, []display.StepOp{deploy.OpReplace, deploy.OpCreateReplacement, deploy.OpDeleteReplaced}, false) @@ -1721,14 +1720,14 @@ func TestAliases(t *testing.T) { }, deleteBeforeReplace: true, aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1::n1"}, + {Type: "pkgA:index:t1", Name: "n1"}, }, }, { t: "pkgA:index:t2-new", name: "n2-new", dependencies: []resource.URN{"urn:pulumi:test::test::pkgA:index:t1-new::n1-new"}, aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t2::n2"}, + {Type: "pkgA:index:t2", Name: "n2"}, }, }}, []display.StepOp{deploy.OpSame, deploy.OpReplace, deploy.OpCreateReplacement, deploy.OpDeleteReplaced}, false) @@ -1754,14 +1753,14 @@ func TestAliases(t *testing.T) { }, deleteBeforeReplace: true, aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1::n1"}, + {Type: "pkgA:index:t1", Name: "n1"}, }, }, { t: "pkgA:index:t2-new", name: "n2-new", parent: resource.URN("urn:pulumi:test::test::pkgA:index:t1-new::n1-new"), aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1$pkgA:index:t2::n2"}, + {Type: "pkgA:index:t2", Name: "n2"}, }, }}, []display.StepOp{deploy.OpSame, deploy.OpReplace, deploy.OpCreateReplacement, deploy.OpDeleteReplaced}, false) @@ -1770,13 +1769,13 @@ func TestAliases(t *testing.T) { t: "pkgA:index:t1", name: "n2", aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1::n1"}, + {Name: "n1"}, }, }, { t: "pkgA:index:t2", name: "n3", aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1::n1"}, + {Type: "pkgA:index:t1", Name: "n1"}, }, }}, []display.StepOp{deploy.OpCreate}, true) @@ -1785,13 +1784,13 @@ func TestAliases(t *testing.T) { t: "pkgA:index:t1", name: "n1", aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1::n1"}, + {Name: "n1"}, }, }, { t: "pkgA:index:t2", name: "n2", aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1::n2"}, + {Type: "index:t1"}, }, }}, []display.StepOp{deploy.OpCreate}, false) @@ -1815,21 +1814,21 @@ func TestAliases(t *testing.T) { t: "pkgA:index:t1-new", name: "n1-new", aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1::n1"}, + {Type: "pkgA:index:t1", Name: "n1"}, }, }, { t: "pkgA:index:t2", name: "n1-new-sub", parent: resource.URN("urn:pulumi:test::test::pkgA:index:t1-new::n1-new"), aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1$pkgA:index:t2::n1-sub"}, + {Type: "pkgA:index:t2", Name: "n1-sub"}, }, }, { t: "pkgA:index:t3", name: "n1-new-sub-sub", parent: resource.URN("urn:pulumi:test::test::pkgA:index:t1-new$pkgA:index:t2::n1-new-sub"), aliases: []resource.Alias{ - {URN: "urn:pulumi:test::test::pkgA:index:t1$pkgA:index:t2$pkgA:index:t3::n1-sub-sub"}, + {Type: "pkgA:index:t3", Name: "n1-sub-sub"}, }, }}, []display.StepOp{deploy.OpSame}, false) From d12b453e1828c4496191392f4ec6c7df745d7b90 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Wed, 26 Apr 2023 17:47:47 -0700 Subject: [PATCH 02/20] Add more parent/children alias tests This commit adds more coverage for aliases with parent/child relationships, with new spec-based and equivalent URN-based tests. The spec-based tests fail without a fix in the engine. --- pkg/engine/lifecycletest/pulumi_test.go | 202 ++++++++++++++++++++++++ 1 file changed, 202 insertions(+) diff --git a/pkg/engine/lifecycletest/pulumi_test.go b/pkg/engine/lifecycletest/pulumi_test.go index 5dab1dc8cc92..77257da0d041 100644 --- a/pkg/engine/lifecycletest/pulumi_test.go +++ b/pkg/engine/lifecycletest/pulumi_test.go @@ -1889,6 +1889,107 @@ func TestAliases(t *testing.T) { var err error _, err = snap.NormalizeURNReferences() assert.Nil(t, err) + + // Start again with a parent and child. + snap = updateProgramWithResource(nil, []Resource{{ + t: "pkgA:index:parent", + name: "parent", + }, { + t: "pkgA:index:child", + parent: "urn:pulumi:test::test::pkgA:index:parent::parent", + name: "child", + }}, []display.StepOp{deploy.OpCreate}, false) + + // Ensure renaming just the child produces Same + snap = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:parent", + name: "parent", + }, { + t: "pkgA:index:child", + parent: "urn:pulumi:test::test::pkgA:index:parent::parent", + name: "childnew", + aliases: []resource.Alias{ + {Name: "child"}, + }, + }}, []display.StepOp{deploy.OpSame}, false) + + // Ensure changing just the child's type produces Same + _ = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:parent", + name: "parent", + }, { + t: "pkgA:index:child2", + parent: "urn:pulumi:test::test::pkgA:index:parent::parent", + name: "childnew", + aliases: []resource.Alias{ + {Type: "pkgA:index:child"}, + }, + }}, []display.StepOp{deploy.OpSame}, false) + + // Start again with multiple nested children. + snap = updateProgramWithResource(nil, []Resource{{ + t: "pkgA:index:t1", + name: "parent", + }, { + t: "pkgA:index:t1", + parent: "urn:pulumi:test::test::pkgA:index:t1::parent", + name: "sub", + }, { + t: "pkgA:index:t1", + parent: "urn:pulumi:test::test::pkgA:index:t1$pkgA:index:t1::sub", + name: "sub-sub", + }}, []display.StepOp{deploy.OpCreate}, false) + + // Ensure renaming the bottom child produces Same. + _ = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:t1", + name: "parent", + }, { + t: "pkgA:index:t1", + parent: "urn:pulumi:test::test::pkgA:index:t1::parent", + name: "sub", + }, { + t: "pkgA:index:t1", + parent: "urn:pulumi:test::test::pkgA:index:t1$pkgA:index:t1::sub", + name: "sub-sub-new", + aliases: []resource.Alias{ + {Name: "sub-sub"}, + }, + }}, []display.StepOp{deploy.OpSame}, false) + + // Start again with two resources with no relationship. + snap = updateProgramWithResource(nil, []Resource{{ + t: "pkgA:index:t1", + name: "one", + }, { + t: "pkgA:index:t2", + name: "two", + }}, []display.StepOp{deploy.OpCreate}, false) + + // Now make "two" a child of "one" ensuring no changes. + snap = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:t1", + name: "one", + }, { + t: "pkgA:index:t2", + parent: "urn:pulumi:test::test::pkgA:index:t1::one", + name: "two", + aliases: []resource.Alias{ + {NoParent: true}, + }, + }}, []display.StepOp{deploy.OpSame}, false) + + // Now remove the parent relationship. + _ = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:t1", + name: "one", + }, { + t: "pkgA:index:t2", + name: "two", + aliases: []resource.Alias{ + {Parent: "urn:pulumi:test::test::pkgA:index:t1::one"}, + }, + }}, []display.StepOp{deploy.OpSame}, false) } func TestAliasURNs(t *testing.T) { @@ -2280,6 +2381,107 @@ func TestAliasURNs(t *testing.T) { var err error _, err = snap.NormalizeURNReferences() assert.Nil(t, err) + + // Start again with a parent and child. + snap = updateProgramWithResource(nil, []Resource{{ + t: "pkgA:index:parent", + name: "parent", + }, { + t: "pkgA:index:child", + parent: "urn:pulumi:test::test::pkgA:index:parent::parent", + name: "child", + }}, []display.StepOp{deploy.OpCreate}, false) + + // Ensure renaming just the child produces Same + snap = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:parent", + name: "parent", + }, { + t: "pkgA:index:child", + parent: "urn:pulumi:test::test::pkgA:index:parent::parent", + name: "childnew", + aliasURNs: []resource.URN{ + "urn:pulumi:test::test::pkgA:index:parent$pkgA:index:child::child", + }, + }}, []display.StepOp{deploy.OpSame}, false) + + // Ensure changing just the child's type produces Same + _ = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:parent", + name: "parent", + }, { + t: "pkgA:index:child2", + parent: "urn:pulumi:test::test::pkgA:index:parent::parent", + name: "childnew", + aliasURNs: []resource.URN{ + "urn:pulumi:test::test::pkgA:index:parent$pkgA:index:child::childnew", + }, + }}, []display.StepOp{deploy.OpSame}, false) + + // Start again with multiple nested children. + snap = updateProgramWithResource(nil, []Resource{{ + t: "pkgA:index:t1", + name: "parent", + }, { + t: "pkgA:index:t1", + parent: "urn:pulumi:test::test::pkgA:index:t1::parent", + name: "sub", + }, { + t: "pkgA:index:t1", + parent: "urn:pulumi:test::test::pkgA:index:t1$pkgA:index:t1::sub", + name: "sub-sub", + }}, []display.StepOp{deploy.OpCreate}, false) + + // Ensure renaming the bottom child produces Same. + _ = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:t1", + name: "parent", + }, { + t: "pkgA:index:t1", + parent: "urn:pulumi:test::test::pkgA:index:t1::parent", + name: "sub", + }, { + t: "pkgA:index:t1", + parent: "urn:pulumi:test::test::pkgA:index:t1$pkgA:index:t1::sub", + name: "sub-sub-new", + aliasURNs: []resource.URN{ + "urn:pulumi:test::test::pkgA:index:t1$pkgA:index:t1$pkgA:index:t1::sub-sub", + }, + }}, []display.StepOp{deploy.OpSame}, false) + + // Start again with two resources with no relationship. + snap = updateProgramWithResource(nil, []Resource{{ + t: "pkgA:index:t1", + name: "one", + }, { + t: "pkgA:index:t2", + name: "two", + }}, []display.StepOp{deploy.OpCreate}, false) + + // Now make "two" a child of "one" ensuring no changes. + snap = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:t1", + name: "one", + }, { + t: "pkgA:index:t2", + parent: "urn:pulumi:test::test::pkgA:index:t1::one", + name: "two", + aliasURNs: []resource.URN{ + "urn:pulumi:test::test::pkgA:index:t2::two", + }, + }}, []display.StepOp{deploy.OpSame}, false) + + // Now remove the parent relationship. + _ = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:t1", + name: "one", + }, { + t: "pkgA:index:t2", + name: "two", + aliasURNs: []resource.URN{ + "urn:pulumi:test::test::pkgA:index:t1$pkgA:index:t2::two", + }, + }}, []display.StepOp{deploy.OpSame}, false) } func TestPersistentDiff(t *testing.T) { From 1a27c09e712ccf204e81b66f691d4c3d48a9b15b Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 15:32:05 -0700 Subject: [PATCH 03/20] Add aliases/go/adopt_component_child test --- tests/integration/aliases/aliases_go_test.go | 1 + .../adopt_component_child/step1/Pulumi.yaml | 3 + .../go/adopt_component_child/step1/go.mod | 66 +++++ .../go/adopt_component_child/step1/go.sum | 272 ++++++++++++++++++ .../go/adopt_component_child/step1/main.go | 51 ++++ .../go/adopt_component_child/step2/main.go | 54 ++++ 6 files changed, 447 insertions(+) create mode 100644 tests/integration/aliases/go/adopt_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/go/adopt_component_child/step1/go.mod create mode 100644 tests/integration/aliases/go/adopt_component_child/step1/go.sum create mode 100644 tests/integration/aliases/go/adopt_component_child/step1/main.go create mode 100644 tests/integration/aliases/go/adopt_component_child/step2/main.go diff --git a/tests/integration/aliases/aliases_go_test.go b/tests/integration/aliases/aliases_go_test.go index b74f34e4e7df..c1736b495e9d 100644 --- a/tests/integration/aliases/aliases_go_test.go +++ b/tests/integration/aliases/aliases_go_test.go @@ -20,6 +20,7 @@ func TestGoAliases(t *testing.T) { "retype_component", "rename_component", "retype_parents", + "adopt_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/go/adopt_component_child/step1/Pulumi.yaml b/tests/integration/aliases/go/adopt_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..323adbbfc895 --- /dev/null +++ b/tests/integration/aliases/go/adopt_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: adopt_component_child +description: A program that adopts a component child with an alias. +runtime: go diff --git a/tests/integration/aliases/go/adopt_component_child/step1/go.mod b/tests/integration/aliases/go/adopt_component_child/step1/go.mod new file mode 100644 index 000000000000..663225e86fb5 --- /dev/null +++ b/tests/integration/aliases/go/adopt_component_child/step1/go.mod @@ -0,0 +1,66 @@ +module github.com/pulumi/pulumi/tests/aliases/adopt_component_child + +go 1.18 + +require github.com/pulumi/pulumi/sdk/v3 v3.65.1 + +require ( + github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect + github.com/acomagu/bufpipe v1.0.3 // indirect + github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect + github.com/blang/semver v3.5.1+incompatible // indirect + github.com/cheggaaa/pb v1.0.29 // indirect + github.com/cloudflare/circl v1.1.0 // indirect + github.com/djherbis/times v1.5.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-git/gcfg v1.5.0 // indirect + github.com/go-git/go-billy/v5 v5.4.0 // indirect + github.com/go-git/go-git/v5 v5.6.0 // indirect + github.com/gofrs/uuid v4.2.0+incompatible // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.0.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/imdario/mergo v0.3.13 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mitchellh/go-ps v1.0.0 // indirect + github.com/opentracing/basictracer-go v1.1.0 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pjbgf/sha1cd v0.3.0 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pkg/term v1.1.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect + github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect + github.com/sergi/go-diff v1.2.0 // indirect + github.com/skeema/knownhosts v1.1.0 // indirect + github.com/spf13/cobra v1.6.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect + github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect + github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect + go.uber.org/atomic v1.9.0 // indirect + golang.org/x/crypto v0.3.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 // indirect + google.golang.org/grpc v1.51.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect + sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 // indirect +) diff --git a/tests/integration/aliases/go/adopt_component_child/step1/go.sum b/tests/integration/aliases/go/adopt_component_child/step1/go.sum new file mode 100644 index 000000000000..3c8f779e10f6 --- /dev/null +++ b/tests/integration/aliases/go/adopt_component_child/step1/go.sum @@ -0,0 +1,272 @@ +github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 h1:ra2OtmuW0AE5csawV4YXMNGNQQXvLRps3z2Z59OPO+I= +github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= +github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= +github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY= +github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo= +github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= +github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/djherbis/times v1.5.0 h1:79myA211VwPhFTqUk8xehWrsEO+zcIZj0zT8mXPVARU= +github.com/djherbis/times v1.5.0/go.mod h1:5q7FDLvbNg1L/KaBmPcWlVR9NmoKo3+ucqUA3ijQhA0= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= +github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= +github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.4.0 h1:Vaw7LaSTRJOUric7pe4vnzBSgyuf2KrLsu2Y4ZpQBDE= +github.com/go-git/go-billy/v5 v5.4.0/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= +github.com/go-git/go-git-fixtures/v4 v4.3.1 h1:y5z6dd3qi8Hl+stezc8p3JxDkoTRqMAlKnXHuzrfjTQ= +github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= +github.com/go-git/go-git/v5 v5.6.0 h1:JvBdYfcttd+0kdpuWO7KTu0FYgCf5W0t5VwkWGobaa4= +github.com/go-git/go-git/v5 v5.6.0/go.mod h1:6nmJ0tJ3N4noMV1Omv7rC5FG3/o8Cm51TB4CJp7mRmE= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= +github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0= +github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS69fQMD+MNP1mRs6mBQc= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk= +github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pulumi/pulumi/sdk/v3 v3.65.1 h1:cF8n1PLqJ7O6Fj/E015XzLAixaeL3I52BvguAdlRn88= +github.com/pulumi/pulumi/sdk/v3 v3.65.1/go.mod h1:hK2uQnf2SwwvCcaAco3l9+g5mGOkRfR7uqUaZpY/fD8= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= +github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= +github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 h1:TToq11gyfNlrMFZiYujSekIsPd9AmsA2Bj/iv+s4JHE= +github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= +github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= +github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= +github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= +github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7/go.mod h1:UxoP3EypF8JfGEjAII8jx1q8rQyDnX8qdTCs/UQBVIE= +github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= +github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= +github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +golang.org/x/arch v0.1.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 h1:QntLWYqZeuBtJkth3m/6DLznnI0AHJr+AgJXvVh/izw= +google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +lukechampine.com/frand v1.4.2 h1:RzFIpOvkMXuPMBb9maa4ND4wjBn71E1Jpf8BzJHMaVw= +lukechampine.com/frand v1.4.2/go.mod h1:4S/TM2ZgrKejMcKMbeLjISpJMO+/eZ1zu3vYX9dtj3s= +pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 h1:hfyJ5ku9yFtLVOiSxa3IN+dx5eBQT9mPmKFypAmg8XM= +sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/tests/integration/aliases/go/adopt_component_child/step1/main.go b/tests/integration/aliases/go/adopt_component_child/step1/main.go new file mode 100644 index 000000000000..81396343a772 --- /dev/null +++ b/tests/integration/aliases/go/adopt_component_child/step1/main.go @@ -0,0 +1,51 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. +//go:build !all +// +build !all + +package main + +import ( + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type FooResource struct { + pulumi.ResourceState +} + +type FooComponent struct { + pulumi.ResourceState +} + +func NewFooResource(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooResource, error) { + fooRes := &FooResource{} + err := ctx.RegisterComponentResource("my:module:FooResource", name, fooRes, opts...) + if err != nil { + return nil, err + } + return fooRes, nil +} + +func NewFooComponent(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooComponent, error) { + fooComp := &FooComponent{} + err := ctx.RegisterComponentResource("my:module:FooComponent", name, fooComp, opts...) + if err != nil { + return nil, err + } + return fooComp, nil +} + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := NewFooComponent(ctx, "foo") + if err != nil { + return err + } + + _, err = NewFooResource(ctx, "child") + if err != nil { + return err + } + + return nil + }) +} diff --git a/tests/integration/aliases/go/adopt_component_child/step2/main.go b/tests/integration/aliases/go/adopt_component_child/step2/main.go new file mode 100644 index 000000000000..babb76b011e9 --- /dev/null +++ b/tests/integration/aliases/go/adopt_component_child/step2/main.go @@ -0,0 +1,54 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. +//go:build !all +// +build !all + +package main + +import ( + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type FooResource struct { + pulumi.ResourceState +} + +type FooComponent struct { + pulumi.ResourceState +} + +func NewFooResource(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooResource, error) { + fooRes := &FooResource{} + err := ctx.RegisterComponentResource("my:module:FooResource", name, fooRes, opts...) + if err != nil { + return nil, err + } + return fooRes, nil +} + +func NewFooComponent(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooComponent, error) { + fooComp := &FooComponent{} + err := ctx.RegisterComponentResource("my:module:FooComponent", name, fooComp, opts...) + if err != nil { + return nil, err + } + parentOpt := pulumi.Parent(fooComp) + aliasOpt := pulumi.Aliases([]pulumi.Alias{{ + NoParent: pulumi.Bool(true), + }}) + _, err = NewFooResource(ctx, "child", parentOpt, aliasOpt) + if err != nil { + return nil, err + } + return fooComp, nil +} + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := NewFooComponent(ctx, "foo") + if err != nil { + return err + } + + return nil + }) +} From 34f44649579cbc7b67ed4dcb931f73950a0b833b Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 15:32:18 -0700 Subject: [PATCH 04/20] Add aliases/go/extract_component_child test --- tests/integration/aliases/aliases_go_test.go | 1 + .../extract_component_child/step1/Pulumi.yaml | 3 + .../go/extract_component_child/step1/go.mod | 66 +++++ .../go/extract_component_child/step1/go.sum | 272 ++++++++++++++++++ .../go/extract_component_child/step1/main.go | 51 ++++ .../go/extract_component_child/step2/main.go | 54 ++++ 6 files changed, 447 insertions(+) create mode 100644 tests/integration/aliases/go/extract_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/go/extract_component_child/step1/go.mod create mode 100644 tests/integration/aliases/go/extract_component_child/step1/go.sum create mode 100644 tests/integration/aliases/go/extract_component_child/step1/main.go create mode 100644 tests/integration/aliases/go/extract_component_child/step2/main.go diff --git a/tests/integration/aliases/aliases_go_test.go b/tests/integration/aliases/aliases_go_test.go index c1736b495e9d..0c1d05bf9626 100644 --- a/tests/integration/aliases/aliases_go_test.go +++ b/tests/integration/aliases/aliases_go_test.go @@ -21,6 +21,7 @@ func TestGoAliases(t *testing.T) { "rename_component", "retype_parents", "adopt_component_child", + "extract_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/go/extract_component_child/step1/Pulumi.yaml b/tests/integration/aliases/go/extract_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..0db6198c386e --- /dev/null +++ b/tests/integration/aliases/go/extract_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: extract_component_child +description: A program that extracts a component child with an alias. +runtime: go diff --git a/tests/integration/aliases/go/extract_component_child/step1/go.mod b/tests/integration/aliases/go/extract_component_child/step1/go.mod new file mode 100644 index 000000000000..3ccec48f219b --- /dev/null +++ b/tests/integration/aliases/go/extract_component_child/step1/go.mod @@ -0,0 +1,66 @@ +module github.com/pulumi/pulumi/tests/aliases/extract_component_child + +go 1.18 + +require github.com/pulumi/pulumi/sdk/v3 v3.65.1 + +require ( + github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect + github.com/acomagu/bufpipe v1.0.3 // indirect + github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect + github.com/blang/semver v3.5.1+incompatible // indirect + github.com/cheggaaa/pb v1.0.29 // indirect + github.com/cloudflare/circl v1.1.0 // indirect + github.com/djherbis/times v1.5.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-git/gcfg v1.5.0 // indirect + github.com/go-git/go-billy/v5 v5.4.0 // indirect + github.com/go-git/go-git/v5 v5.6.0 // indirect + github.com/gofrs/uuid v4.2.0+incompatible // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.0.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/imdario/mergo v0.3.13 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mitchellh/go-ps v1.0.0 // indirect + github.com/opentracing/basictracer-go v1.1.0 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pjbgf/sha1cd v0.3.0 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pkg/term v1.1.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect + github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect + github.com/sergi/go-diff v1.2.0 // indirect + github.com/skeema/knownhosts v1.1.0 // indirect + github.com/spf13/cobra v1.6.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect + github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect + github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect + go.uber.org/atomic v1.9.0 // indirect + golang.org/x/crypto v0.3.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 // indirect + google.golang.org/grpc v1.51.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect + sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 // indirect +) diff --git a/tests/integration/aliases/go/extract_component_child/step1/go.sum b/tests/integration/aliases/go/extract_component_child/step1/go.sum new file mode 100644 index 000000000000..3c8f779e10f6 --- /dev/null +++ b/tests/integration/aliases/go/extract_component_child/step1/go.sum @@ -0,0 +1,272 @@ +github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 h1:ra2OtmuW0AE5csawV4YXMNGNQQXvLRps3z2Z59OPO+I= +github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= +github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= +github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY= +github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo= +github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= +github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/djherbis/times v1.5.0 h1:79myA211VwPhFTqUk8xehWrsEO+zcIZj0zT8mXPVARU= +github.com/djherbis/times v1.5.0/go.mod h1:5q7FDLvbNg1L/KaBmPcWlVR9NmoKo3+ucqUA3ijQhA0= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= +github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= +github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.4.0 h1:Vaw7LaSTRJOUric7pe4vnzBSgyuf2KrLsu2Y4ZpQBDE= +github.com/go-git/go-billy/v5 v5.4.0/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= +github.com/go-git/go-git-fixtures/v4 v4.3.1 h1:y5z6dd3qi8Hl+stezc8p3JxDkoTRqMAlKnXHuzrfjTQ= +github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= +github.com/go-git/go-git/v5 v5.6.0 h1:JvBdYfcttd+0kdpuWO7KTu0FYgCf5W0t5VwkWGobaa4= +github.com/go-git/go-git/v5 v5.6.0/go.mod h1:6nmJ0tJ3N4noMV1Omv7rC5FG3/o8Cm51TB4CJp7mRmE= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= +github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0= +github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS69fQMD+MNP1mRs6mBQc= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk= +github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pulumi/pulumi/sdk/v3 v3.65.1 h1:cF8n1PLqJ7O6Fj/E015XzLAixaeL3I52BvguAdlRn88= +github.com/pulumi/pulumi/sdk/v3 v3.65.1/go.mod h1:hK2uQnf2SwwvCcaAco3l9+g5mGOkRfR7uqUaZpY/fD8= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= +github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= +github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 h1:TToq11gyfNlrMFZiYujSekIsPd9AmsA2Bj/iv+s4JHE= +github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= +github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= +github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= +github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= +github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7/go.mod h1:UxoP3EypF8JfGEjAII8jx1q8rQyDnX8qdTCs/UQBVIE= +github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= +github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= +github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +golang.org/x/arch v0.1.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 h1:QntLWYqZeuBtJkth3m/6DLznnI0AHJr+AgJXvVh/izw= +google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +lukechampine.com/frand v1.4.2 h1:RzFIpOvkMXuPMBb9maa4ND4wjBn71E1Jpf8BzJHMaVw= +lukechampine.com/frand v1.4.2/go.mod h1:4S/TM2ZgrKejMcKMbeLjISpJMO+/eZ1zu3vYX9dtj3s= +pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 h1:hfyJ5ku9yFtLVOiSxa3IN+dx5eBQT9mPmKFypAmg8XM= +sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/tests/integration/aliases/go/extract_component_child/step1/main.go b/tests/integration/aliases/go/extract_component_child/step1/main.go new file mode 100644 index 000000000000..8069938e5555 --- /dev/null +++ b/tests/integration/aliases/go/extract_component_child/step1/main.go @@ -0,0 +1,51 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. +//go:build !all +// +build !all + +package main + +import ( + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type FooResource struct { + pulumi.ResourceState +} + +type FooComponent struct { + pulumi.ResourceState +} + +func NewFooResource(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooResource, error) { + fooRes := &FooResource{} + err := ctx.RegisterComponentResource("my:module:FooResource", name, fooRes, opts...) + if err != nil { + return nil, err + } + return fooRes, nil +} + +func NewFooComponent(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooComponent, error) { + fooComp := &FooComponent{} + err := ctx.RegisterComponentResource("my:module:FooComponent", name, fooComp, opts...) + if err != nil { + return nil, err + } + parentOpt := pulumi.Parent(fooComp) + _, err = NewFooResource(ctx, "child", parentOpt) + if err != nil { + return nil, err + } + return fooComp, nil +} + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := NewFooComponent(ctx, "foo") + if err != nil { + return err + } + + return nil + }) +} diff --git a/tests/integration/aliases/go/extract_component_child/step2/main.go b/tests/integration/aliases/go/extract_component_child/step2/main.go new file mode 100644 index 000000000000..03b279731baa --- /dev/null +++ b/tests/integration/aliases/go/extract_component_child/step2/main.go @@ -0,0 +1,54 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. +//go:build !all +// +build !all + +package main + +import ( + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type FooResource struct { + pulumi.ResourceState +} + +type FooComponent struct { + pulumi.ResourceState +} + +func NewFooResource(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooResource, error) { + fooRes := &FooResource{} + err := ctx.RegisterComponentResource("my:module:FooResource", name, fooRes, opts...) + if err != nil { + return nil, err + } + return fooRes, nil +} + +func NewFooComponent(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooComponent, error) { + fooComp := &FooComponent{} + err := ctx.RegisterComponentResource("my:module:FooComponent", name, fooComp, opts...) + if err != nil { + return nil, err + } + return fooComp, nil +} + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + foo, err := NewFooComponent(ctx, "foo") + if err != nil { + return err + } + + aliasOpt := pulumi.Aliases([]pulumi.Alias{{ + Parent: foo, + }}) + _, err = NewFooResource(ctx, "child", aliasOpt) + if err != nil { + return err + } + + return nil + }) +} From 6e2eadfb612cfd8fcf6373caaaba8ec20719a954 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 15:32:37 -0700 Subject: [PATCH 05/20] Add aliases/go/rename_component_child test --- tests/integration/aliases/aliases_go_test.go | 1 + .../rename_component_child/step1/Pulumi.yaml | 3 + .../go/rename_component_child/step1/go.mod | 66 +++++ .../go/rename_component_child/step1/go.sum | 272 ++++++++++++++++++ .../go/rename_component_child/step1/main.go | 51 ++++ .../go/rename_component_child/step2/main.go | 54 ++++ 6 files changed, 447 insertions(+) create mode 100644 tests/integration/aliases/go/rename_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/go/rename_component_child/step1/go.mod create mode 100644 tests/integration/aliases/go/rename_component_child/step1/go.sum create mode 100644 tests/integration/aliases/go/rename_component_child/step1/main.go create mode 100644 tests/integration/aliases/go/rename_component_child/step2/main.go diff --git a/tests/integration/aliases/aliases_go_test.go b/tests/integration/aliases/aliases_go_test.go index 0c1d05bf9626..f5890d7c972e 100644 --- a/tests/integration/aliases/aliases_go_test.go +++ b/tests/integration/aliases/aliases_go_test.go @@ -22,6 +22,7 @@ func TestGoAliases(t *testing.T) { "retype_parents", "adopt_component_child", "extract_component_child", + "rename_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/go/rename_component_child/step1/Pulumi.yaml b/tests/integration/aliases/go/rename_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..dba13b6efa06 --- /dev/null +++ b/tests/integration/aliases/go/rename_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: rename_component_child +description: A program that renames a component child with an alias. +runtime: go diff --git a/tests/integration/aliases/go/rename_component_child/step1/go.mod b/tests/integration/aliases/go/rename_component_child/step1/go.mod new file mode 100644 index 000000000000..0cdc0112ef1e --- /dev/null +++ b/tests/integration/aliases/go/rename_component_child/step1/go.mod @@ -0,0 +1,66 @@ +module github.com/pulumi/pulumi/tests/aliases/rename_component_child + +go 1.18 + +require github.com/pulumi/pulumi/sdk/v3 v3.65.1 + +require ( + github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect + github.com/acomagu/bufpipe v1.0.3 // indirect + github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect + github.com/blang/semver v3.5.1+incompatible // indirect + github.com/cheggaaa/pb v1.0.29 // indirect + github.com/cloudflare/circl v1.1.0 // indirect + github.com/djherbis/times v1.5.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-git/gcfg v1.5.0 // indirect + github.com/go-git/go-billy/v5 v5.4.0 // indirect + github.com/go-git/go-git/v5 v5.6.0 // indirect + github.com/gofrs/uuid v4.2.0+incompatible // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.0.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/imdario/mergo v0.3.13 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mitchellh/go-ps v1.0.0 // indirect + github.com/opentracing/basictracer-go v1.1.0 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pjbgf/sha1cd v0.3.0 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pkg/term v1.1.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect + github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect + github.com/sergi/go-diff v1.2.0 // indirect + github.com/skeema/knownhosts v1.1.0 // indirect + github.com/spf13/cobra v1.6.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect + github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect + github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect + go.uber.org/atomic v1.9.0 // indirect + golang.org/x/crypto v0.3.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 // indirect + google.golang.org/grpc v1.51.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect + sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 // indirect +) diff --git a/tests/integration/aliases/go/rename_component_child/step1/go.sum b/tests/integration/aliases/go/rename_component_child/step1/go.sum new file mode 100644 index 000000000000..3c8f779e10f6 --- /dev/null +++ b/tests/integration/aliases/go/rename_component_child/step1/go.sum @@ -0,0 +1,272 @@ +github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 h1:ra2OtmuW0AE5csawV4YXMNGNQQXvLRps3z2Z59OPO+I= +github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= +github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= +github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY= +github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo= +github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= +github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/djherbis/times v1.5.0 h1:79myA211VwPhFTqUk8xehWrsEO+zcIZj0zT8mXPVARU= +github.com/djherbis/times v1.5.0/go.mod h1:5q7FDLvbNg1L/KaBmPcWlVR9NmoKo3+ucqUA3ijQhA0= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= +github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= +github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.4.0 h1:Vaw7LaSTRJOUric7pe4vnzBSgyuf2KrLsu2Y4ZpQBDE= +github.com/go-git/go-billy/v5 v5.4.0/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= +github.com/go-git/go-git-fixtures/v4 v4.3.1 h1:y5z6dd3qi8Hl+stezc8p3JxDkoTRqMAlKnXHuzrfjTQ= +github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= +github.com/go-git/go-git/v5 v5.6.0 h1:JvBdYfcttd+0kdpuWO7KTu0FYgCf5W0t5VwkWGobaa4= +github.com/go-git/go-git/v5 v5.6.0/go.mod h1:6nmJ0tJ3N4noMV1Omv7rC5FG3/o8Cm51TB4CJp7mRmE= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= +github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0= +github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS69fQMD+MNP1mRs6mBQc= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk= +github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pulumi/pulumi/sdk/v3 v3.65.1 h1:cF8n1PLqJ7O6Fj/E015XzLAixaeL3I52BvguAdlRn88= +github.com/pulumi/pulumi/sdk/v3 v3.65.1/go.mod h1:hK2uQnf2SwwvCcaAco3l9+g5mGOkRfR7uqUaZpY/fD8= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= +github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= +github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 h1:TToq11gyfNlrMFZiYujSekIsPd9AmsA2Bj/iv+s4JHE= +github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= +github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= +github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= +github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= +github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7/go.mod h1:UxoP3EypF8JfGEjAII8jx1q8rQyDnX8qdTCs/UQBVIE= +github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= +github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= +github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +golang.org/x/arch v0.1.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 h1:QntLWYqZeuBtJkth3m/6DLznnI0AHJr+AgJXvVh/izw= +google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +lukechampine.com/frand v1.4.2 h1:RzFIpOvkMXuPMBb9maa4ND4wjBn71E1Jpf8BzJHMaVw= +lukechampine.com/frand v1.4.2/go.mod h1:4S/TM2ZgrKejMcKMbeLjISpJMO+/eZ1zu3vYX9dtj3s= +pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 h1:hfyJ5ku9yFtLVOiSxa3IN+dx5eBQT9mPmKFypAmg8XM= +sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/tests/integration/aliases/go/rename_component_child/step1/main.go b/tests/integration/aliases/go/rename_component_child/step1/main.go new file mode 100644 index 000000000000..8069938e5555 --- /dev/null +++ b/tests/integration/aliases/go/rename_component_child/step1/main.go @@ -0,0 +1,51 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. +//go:build !all +// +build !all + +package main + +import ( + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type FooResource struct { + pulumi.ResourceState +} + +type FooComponent struct { + pulumi.ResourceState +} + +func NewFooResource(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooResource, error) { + fooRes := &FooResource{} + err := ctx.RegisterComponentResource("my:module:FooResource", name, fooRes, opts...) + if err != nil { + return nil, err + } + return fooRes, nil +} + +func NewFooComponent(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooComponent, error) { + fooComp := &FooComponent{} + err := ctx.RegisterComponentResource("my:module:FooComponent", name, fooComp, opts...) + if err != nil { + return nil, err + } + parentOpt := pulumi.Parent(fooComp) + _, err = NewFooResource(ctx, "child", parentOpt) + if err != nil { + return nil, err + } + return fooComp, nil +} + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := NewFooComponent(ctx, "foo") + if err != nil { + return err + } + + return nil + }) +} diff --git a/tests/integration/aliases/go/rename_component_child/step2/main.go b/tests/integration/aliases/go/rename_component_child/step2/main.go new file mode 100644 index 000000000000..70fdbc049fd9 --- /dev/null +++ b/tests/integration/aliases/go/rename_component_child/step2/main.go @@ -0,0 +1,54 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. +//go:build !all +// +build !all + +package main + +import ( + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type FooResource struct { + pulumi.ResourceState +} + +type FooComponent struct { + pulumi.ResourceState +} + +func NewFooResource(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooResource, error) { + fooRes := &FooResource{} + err := ctx.RegisterComponentResource("my:module:FooResource", name, fooRes, opts...) + if err != nil { + return nil, err + } + return fooRes, nil +} + +func NewFooComponent(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooComponent, error) { + fooComp := &FooComponent{} + err := ctx.RegisterComponentResource("my:module:FooComponent", name, fooComp, opts...) + if err != nil { + return nil, err + } + parentOpt := pulumi.Parent(fooComp) + aliasOpt := pulumi.Aliases([]pulumi.Alias{{ + Name: pulumi.String("child"), + }}) + _, err = NewFooResource(ctx, "childrenamed", parentOpt, aliasOpt) + if err != nil { + return nil, err + } + return fooComp, nil +} + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := NewFooComponent(ctx, "foo") + if err != nil { + return err + } + + return nil + }) +} From a6f4815267570767c7117b972871a0a1df7ce333 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 15:32:46 -0700 Subject: [PATCH 06/20] Add aliases/go/retype_component_child test --- tests/integration/aliases/aliases_go_test.go | 1 + .../retype_component_child/step1/Pulumi.yaml | 3 + .../go/retype_component_child/step1/go.mod | 66 +++++ .../go/retype_component_child/step1/go.sum | 272 ++++++++++++++++++ .../go/retype_component_child/step1/main.go | 51 ++++ .../go/retype_component_child/step2/main.go | 55 ++++ 6 files changed, 448 insertions(+) create mode 100644 tests/integration/aliases/go/retype_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/go/retype_component_child/step1/go.mod create mode 100644 tests/integration/aliases/go/retype_component_child/step1/go.sum create mode 100644 tests/integration/aliases/go/retype_component_child/step1/main.go create mode 100644 tests/integration/aliases/go/retype_component_child/step2/main.go diff --git a/tests/integration/aliases/aliases_go_test.go b/tests/integration/aliases/aliases_go_test.go index f5890d7c972e..ddf150a73995 100644 --- a/tests/integration/aliases/aliases_go_test.go +++ b/tests/integration/aliases/aliases_go_test.go @@ -23,6 +23,7 @@ func TestGoAliases(t *testing.T) { "adopt_component_child", "extract_component_child", "rename_component_child", + "retype_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/go/retype_component_child/step1/Pulumi.yaml b/tests/integration/aliases/go/retype_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..32f4f1fb7a86 --- /dev/null +++ b/tests/integration/aliases/go/retype_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: retype_component_child +description: A program that retypes a component child with an alias. +runtime: go diff --git a/tests/integration/aliases/go/retype_component_child/step1/go.mod b/tests/integration/aliases/go/retype_component_child/step1/go.mod new file mode 100644 index 000000000000..02e54c6d77e0 --- /dev/null +++ b/tests/integration/aliases/go/retype_component_child/step1/go.mod @@ -0,0 +1,66 @@ +module github.com/pulumi/pulumi/tests/aliases/retype_component_child + +go 1.18 + +require github.com/pulumi/pulumi/sdk/v3 v3.65.1 + +require ( + github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect + github.com/acomagu/bufpipe v1.0.3 // indirect + github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect + github.com/blang/semver v3.5.1+incompatible // indirect + github.com/cheggaaa/pb v1.0.29 // indirect + github.com/cloudflare/circl v1.1.0 // indirect + github.com/djherbis/times v1.5.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-git/gcfg v1.5.0 // indirect + github.com/go-git/go-billy/v5 v5.4.0 // indirect + github.com/go-git/go-git/v5 v5.6.0 // indirect + github.com/gofrs/uuid v4.2.0+incompatible // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.0.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/imdario/mergo v0.3.13 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mitchellh/go-ps v1.0.0 // indirect + github.com/opentracing/basictracer-go v1.1.0 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pjbgf/sha1cd v0.3.0 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pkg/term v1.1.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect + github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect + github.com/sergi/go-diff v1.2.0 // indirect + github.com/skeema/knownhosts v1.1.0 // indirect + github.com/spf13/cobra v1.6.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/texttheater/golang-levenshtein v1.0.1 // indirect + github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect + github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect + github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect + go.uber.org/atomic v1.9.0 // indirect + golang.org/x/crypto v0.3.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 // indirect + google.golang.org/grpc v1.51.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + lukechampine.com/frand v1.4.2 // indirect + sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 // indirect +) diff --git a/tests/integration/aliases/go/retype_component_child/step1/go.sum b/tests/integration/aliases/go/retype_component_child/step1/go.sum new file mode 100644 index 000000000000..3c8f779e10f6 --- /dev/null +++ b/tests/integration/aliases/go/retype_component_child/step1/go.sum @@ -0,0 +1,272 @@ +github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 h1:ra2OtmuW0AE5csawV4YXMNGNQQXvLRps3z2Z59OPO+I= +github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= +github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= +github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY= +github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo= +github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= +github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/djherbis/times v1.5.0 h1:79myA211VwPhFTqUk8xehWrsEO+zcIZj0zT8mXPVARU= +github.com/djherbis/times v1.5.0/go.mod h1:5q7FDLvbNg1L/KaBmPcWlVR9NmoKo3+ucqUA3ijQhA0= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= +github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= +github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.4.0 h1:Vaw7LaSTRJOUric7pe4vnzBSgyuf2KrLsu2Y4ZpQBDE= +github.com/go-git/go-billy/v5 v5.4.0/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= +github.com/go-git/go-git-fixtures/v4 v4.3.1 h1:y5z6dd3qi8Hl+stezc8p3JxDkoTRqMAlKnXHuzrfjTQ= +github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= +github.com/go-git/go-git/v5 v5.6.0 h1:JvBdYfcttd+0kdpuWO7KTu0FYgCf5W0t5VwkWGobaa4= +github.com/go-git/go-git/v5 v5.6.0/go.mod h1:6nmJ0tJ3N4noMV1Omv7rC5FG3/o8Cm51TB4CJp7mRmE= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= +github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0= +github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS69fQMD+MNP1mRs6mBQc= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk= +github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pulumi/pulumi/sdk/v3 v3.65.1 h1:cF8n1PLqJ7O6Fj/E015XzLAixaeL3I52BvguAdlRn88= +github.com/pulumi/pulumi/sdk/v3 v3.65.1/go.mod h1:hK2uQnf2SwwvCcaAco3l9+g5mGOkRfR7uqUaZpY/fD8= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= +github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= +github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 h1:TToq11gyfNlrMFZiYujSekIsPd9AmsA2Bj/iv+s4JHE= +github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= +github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= +github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= +github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= +github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7/go.mod h1:UxoP3EypF8JfGEjAII8jx1q8rQyDnX8qdTCs/UQBVIE= +github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= +github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= +github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +golang.org/x/arch v0.1.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 h1:QntLWYqZeuBtJkth3m/6DLznnI0AHJr+AgJXvVh/izw= +google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +lukechampine.com/frand v1.4.2 h1:RzFIpOvkMXuPMBb9maa4ND4wjBn71E1Jpf8BzJHMaVw= +lukechampine.com/frand v1.4.2/go.mod h1:4S/TM2ZgrKejMcKMbeLjISpJMO+/eZ1zu3vYX9dtj3s= +pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 h1:hfyJ5ku9yFtLVOiSxa3IN+dx5eBQT9mPmKFypAmg8XM= +sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/tests/integration/aliases/go/retype_component_child/step1/main.go b/tests/integration/aliases/go/retype_component_child/step1/main.go new file mode 100644 index 000000000000..8069938e5555 --- /dev/null +++ b/tests/integration/aliases/go/retype_component_child/step1/main.go @@ -0,0 +1,51 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. +//go:build !all +// +build !all + +package main + +import ( + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type FooResource struct { + pulumi.ResourceState +} + +type FooComponent struct { + pulumi.ResourceState +} + +func NewFooResource(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooResource, error) { + fooRes := &FooResource{} + err := ctx.RegisterComponentResource("my:module:FooResource", name, fooRes, opts...) + if err != nil { + return nil, err + } + return fooRes, nil +} + +func NewFooComponent(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooComponent, error) { + fooComp := &FooComponent{} + err := ctx.RegisterComponentResource("my:module:FooComponent", name, fooComp, opts...) + if err != nil { + return nil, err + } + parentOpt := pulumi.Parent(fooComp) + _, err = NewFooResource(ctx, "child", parentOpt) + if err != nil { + return nil, err + } + return fooComp, nil +} + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := NewFooComponent(ctx, "foo") + if err != nil { + return err + } + + return nil + }) +} diff --git a/tests/integration/aliases/go/retype_component_child/step2/main.go b/tests/integration/aliases/go/retype_component_child/step2/main.go new file mode 100644 index 000000000000..562c0a5829e4 --- /dev/null +++ b/tests/integration/aliases/go/retype_component_child/step2/main.go @@ -0,0 +1,55 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. +//go:build !all +// +build !all + +package main + +import ( + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type FooResource struct { + pulumi.ResourceState +} + +type FooComponent struct { + pulumi.ResourceState +} + +func NewFooResource(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooResource, error) { + fooRes := &FooResource{} + aliasOpt := pulumi.Aliases([]pulumi.Alias{{ + Type: pulumi.String("my:module:FooResource"), + }}) + opts = append(opts, aliasOpt) + err := ctx.RegisterComponentResource("my:module:FooResourceNew", name, fooRes, opts...) + if err != nil { + return nil, err + } + return fooRes, nil +} + +func NewFooComponent(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*FooComponent, error) { + fooComp := &FooComponent{} + err := ctx.RegisterComponentResource("my:module:FooComponent", name, fooComp, opts...) + if err != nil { + return nil, err + } + parentOpt := pulumi.Parent(fooComp) + _, err = NewFooResource(ctx, "child", parentOpt) + if err != nil { + return nil, err + } + return fooComp, nil +} + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := NewFooComponent(ctx, "foo") + if err != nil { + return err + } + + return nil + }) +} From 187955b1280d5b832cbbd28940c3d8724ee83c92 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 16:27:40 -0700 Subject: [PATCH 07/20] Add aliases/nodejs/adopt_component_child test --- .../aliases/aliases_nodejs_test.go | 1 + .../adopt_component_child/step1/Pulumi.yaml | 3 +++ .../adopt_component_child/step1/index.ts | 19 +++++++++++++++++ .../adopt_component_child/step1/package.json | 7 +++++++ .../adopt_component_child/step2/index.ts | 21 +++++++++++++++++++ 5 files changed, 51 insertions(+) create mode 100644 tests/integration/aliases/nodejs/adopt_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/nodejs/adopt_component_child/step1/index.ts create mode 100644 tests/integration/aliases/nodejs/adopt_component_child/step1/package.json create mode 100644 tests/integration/aliases/nodejs/adopt_component_child/step2/index.ts diff --git a/tests/integration/aliases/aliases_nodejs_test.go b/tests/integration/aliases/aliases_nodejs_test.go index 79451dacc5d3..95630ca721ff 100644 --- a/tests/integration/aliases/aliases_nodejs_test.go +++ b/tests/integration/aliases/aliases_nodejs_test.go @@ -22,6 +22,7 @@ func TestNodejsAliases(t *testing.T) { "retype_component", "rename_component", "retype_parents", + "adopt_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/nodejs/adopt_component_child/step1/Pulumi.yaml b/tests/integration/aliases/nodejs/adopt_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..4fb08461830d --- /dev/null +++ b/tests/integration/aliases/nodejs/adopt_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: aliases_adopt_component_child +description: A program that adopts a component child with an alias. +runtime: nodejs diff --git a/tests/integration/aliases/nodejs/adopt_component_child/step1/index.ts b/tests/integration/aliases/nodejs/adopt_component_child/step1/index.ts new file mode 100644 index 000000000000..cb69b6fd4e31 --- /dev/null +++ b/tests/integration/aliases/nodejs/adopt_component_child/step1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import * as pulumi from "@pulumi/pulumi"; + +class FooResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:FooResource", name, {}, opts); + } +} + +class ComponentResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:ComponentResource", name, {}, opts); + } +} + +new ComponentResource("comp"); + +new FooResource("child"); diff --git a/tests/integration/aliases/nodejs/adopt_component_child/step1/package.json b/tests/integration/aliases/nodejs/adopt_component_child/step1/package.json new file mode 100644 index 000000000000..18e4a9a35895 --- /dev/null +++ b/tests/integration/aliases/nodejs/adopt_component_child/step1/package.json @@ -0,0 +1,7 @@ +{ + "name": "aliases", + "license": "Apache-2.0", + "peerDependencies": { + "@pulumi/pulumi": "latest" + } +} diff --git a/tests/integration/aliases/nodejs/adopt_component_child/step2/index.ts b/tests/integration/aliases/nodejs/adopt_component_child/step2/index.ts new file mode 100644 index 000000000000..a7fdd1a9cd96 --- /dev/null +++ b/tests/integration/aliases/nodejs/adopt_component_child/step2/index.ts @@ -0,0 +1,21 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import * as pulumi from "@pulumi/pulumi"; + +class FooResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:FooResource", name, {}, opts); + } +} + +class ComponentResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:ComponentResource", name, {}, opts); + new FooResource("child", { + parent: this, + aliases: [{ parent: pulumi.rootStackResource }], + }); + } +} + +new ComponentResource("comp"); From b6085639b441394ea0bd97614d330921ee4f2b96 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 16:27:52 -0700 Subject: [PATCH 08/20] Add aliases/nodejs/extract_component_child test --- .../aliases/aliases_nodejs_test.go | 1 + .../extract_component_child/step1/Pulumi.yaml | 3 +++ .../extract_component_child/step1/index.ts | 18 ++++++++++++++++ .../step1/package.json | 7 +++++++ .../extract_component_child/step2/index.ts | 21 +++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 tests/integration/aliases/nodejs/extract_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/nodejs/extract_component_child/step1/index.ts create mode 100644 tests/integration/aliases/nodejs/extract_component_child/step1/package.json create mode 100644 tests/integration/aliases/nodejs/extract_component_child/step2/index.ts diff --git a/tests/integration/aliases/aliases_nodejs_test.go b/tests/integration/aliases/aliases_nodejs_test.go index 95630ca721ff..234103ad9dc2 100644 --- a/tests/integration/aliases/aliases_nodejs_test.go +++ b/tests/integration/aliases/aliases_nodejs_test.go @@ -23,6 +23,7 @@ func TestNodejsAliases(t *testing.T) { "rename_component", "retype_parents", "adopt_component_child", + "extract_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/nodejs/extract_component_child/step1/Pulumi.yaml b/tests/integration/aliases/nodejs/extract_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..859b32438e84 --- /dev/null +++ b/tests/integration/aliases/nodejs/extract_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: aliases_extract_component_child +description: A program that extracts a component child with an alias. +runtime: nodejs diff --git a/tests/integration/aliases/nodejs/extract_component_child/step1/index.ts b/tests/integration/aliases/nodejs/extract_component_child/step1/index.ts new file mode 100644 index 000000000000..38267621a93a --- /dev/null +++ b/tests/integration/aliases/nodejs/extract_component_child/step1/index.ts @@ -0,0 +1,18 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import * as pulumi from "@pulumi/pulumi"; + +class FooResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:FooResource", name, {}, opts); + } +} + +class ComponentResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:ComponentResource", name, {}, opts); + new FooResource("child", { parent: this }); + } +} + +new ComponentResource("comp"); diff --git a/tests/integration/aliases/nodejs/extract_component_child/step1/package.json b/tests/integration/aliases/nodejs/extract_component_child/step1/package.json new file mode 100644 index 000000000000..18e4a9a35895 --- /dev/null +++ b/tests/integration/aliases/nodejs/extract_component_child/step1/package.json @@ -0,0 +1,7 @@ +{ + "name": "aliases", + "license": "Apache-2.0", + "peerDependencies": { + "@pulumi/pulumi": "latest" + } +} diff --git a/tests/integration/aliases/nodejs/extract_component_child/step2/index.ts b/tests/integration/aliases/nodejs/extract_component_child/step2/index.ts new file mode 100644 index 000000000000..617261553203 --- /dev/null +++ b/tests/integration/aliases/nodejs/extract_component_child/step2/index.ts @@ -0,0 +1,21 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import * as pulumi from "@pulumi/pulumi"; + +class FooResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:FooResource", name, {}, opts); + } +} + +class ComponentResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:ComponentResource", name, {}, opts); + } +} + +const comp = new ComponentResource("comp"); + +new FooResource("child", { + aliases: [{ parent: comp }], +}); From 65b646472d1382bc36baa1da3d5cea19a2c1533e Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 16:28:25 -0700 Subject: [PATCH 09/20] Add aliases/nodejs/rename_component_child test --- .../aliases/aliases_nodejs_test.go | 1 + .../rename_component_child/step1/Pulumi.yaml | 3 +++ .../rename_component_child/step1/index.ts | 18 ++++++++++++++++ .../rename_component_child/step1/package.json | 7 +++++++ .../rename_component_child/step2/index.ts | 21 +++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 tests/integration/aliases/nodejs/rename_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/nodejs/rename_component_child/step1/index.ts create mode 100644 tests/integration/aliases/nodejs/rename_component_child/step1/package.json create mode 100644 tests/integration/aliases/nodejs/rename_component_child/step2/index.ts diff --git a/tests/integration/aliases/aliases_nodejs_test.go b/tests/integration/aliases/aliases_nodejs_test.go index 234103ad9dc2..931f9e148f92 100644 --- a/tests/integration/aliases/aliases_nodejs_test.go +++ b/tests/integration/aliases/aliases_nodejs_test.go @@ -24,6 +24,7 @@ func TestNodejsAliases(t *testing.T) { "retype_parents", "adopt_component_child", "extract_component_child", + "rename_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/nodejs/rename_component_child/step1/Pulumi.yaml b/tests/integration/aliases/nodejs/rename_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..bcf992950fd9 --- /dev/null +++ b/tests/integration/aliases/nodejs/rename_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: aliases_rename_component_child +description: A program that renames a component child with an alias. +runtime: nodejs diff --git a/tests/integration/aliases/nodejs/rename_component_child/step1/index.ts b/tests/integration/aliases/nodejs/rename_component_child/step1/index.ts new file mode 100644 index 000000000000..38267621a93a --- /dev/null +++ b/tests/integration/aliases/nodejs/rename_component_child/step1/index.ts @@ -0,0 +1,18 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import * as pulumi from "@pulumi/pulumi"; + +class FooResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:FooResource", name, {}, opts); + } +} + +class ComponentResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:ComponentResource", name, {}, opts); + new FooResource("child", { parent: this }); + } +} + +new ComponentResource("comp"); diff --git a/tests/integration/aliases/nodejs/rename_component_child/step1/package.json b/tests/integration/aliases/nodejs/rename_component_child/step1/package.json new file mode 100644 index 000000000000..18e4a9a35895 --- /dev/null +++ b/tests/integration/aliases/nodejs/rename_component_child/step1/package.json @@ -0,0 +1,7 @@ +{ + "name": "aliases", + "license": "Apache-2.0", + "peerDependencies": { + "@pulumi/pulumi": "latest" + } +} diff --git a/tests/integration/aliases/nodejs/rename_component_child/step2/index.ts b/tests/integration/aliases/nodejs/rename_component_child/step2/index.ts new file mode 100644 index 000000000000..40079ba411fe --- /dev/null +++ b/tests/integration/aliases/nodejs/rename_component_child/step2/index.ts @@ -0,0 +1,21 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import * as pulumi from "@pulumi/pulumi"; + +class FooResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:FooResource", name, {}, opts); + } +} + +class ComponentResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:ComponentResource", name, {}, opts); + new FooResource("childrenamed", { + parent: this, + aliases: [{ name: "child" }], + }); + } +} + +new ComponentResource("comp"); From 6f0ed63622d5f89d51a7b3bcca616e296af871c7 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 16:28:36 -0700 Subject: [PATCH 10/20] Add aliases/nodejs/retype_component_child test --- .../aliases/aliases_nodejs_test.go | 1 + .../retype_component_child/step1/Pulumi.yaml | 3 +++ .../retype_component_child/step1/index.ts | 18 +++++++++++++++++ .../retype_component_child/step1/package.json | 7 +++++++ .../retype_component_child/step2/index.ts | 20 +++++++++++++++++++ 5 files changed, 49 insertions(+) create mode 100644 tests/integration/aliases/nodejs/retype_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/nodejs/retype_component_child/step1/index.ts create mode 100644 tests/integration/aliases/nodejs/retype_component_child/step1/package.json create mode 100644 tests/integration/aliases/nodejs/retype_component_child/step2/index.ts diff --git a/tests/integration/aliases/aliases_nodejs_test.go b/tests/integration/aliases/aliases_nodejs_test.go index 931f9e148f92..114913132fd3 100644 --- a/tests/integration/aliases/aliases_nodejs_test.go +++ b/tests/integration/aliases/aliases_nodejs_test.go @@ -25,6 +25,7 @@ func TestNodejsAliases(t *testing.T) { "adopt_component_child", "extract_component_child", "rename_component_child", + "retype_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/nodejs/retype_component_child/step1/Pulumi.yaml b/tests/integration/aliases/nodejs/retype_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..9b052548d1ad --- /dev/null +++ b/tests/integration/aliases/nodejs/retype_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: aliases_retype_component_child +description: A program that retypes a component child with an alias. +runtime: nodejs diff --git a/tests/integration/aliases/nodejs/retype_component_child/step1/index.ts b/tests/integration/aliases/nodejs/retype_component_child/step1/index.ts new file mode 100644 index 000000000000..38267621a93a --- /dev/null +++ b/tests/integration/aliases/nodejs/retype_component_child/step1/index.ts @@ -0,0 +1,18 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import * as pulumi from "@pulumi/pulumi"; + +class FooResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:FooResource", name, {}, opts); + } +} + +class ComponentResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:ComponentResource", name, {}, opts); + new FooResource("child", { parent: this }); + } +} + +new ComponentResource("comp"); diff --git a/tests/integration/aliases/nodejs/retype_component_child/step1/package.json b/tests/integration/aliases/nodejs/retype_component_child/step1/package.json new file mode 100644 index 000000000000..18e4a9a35895 --- /dev/null +++ b/tests/integration/aliases/nodejs/retype_component_child/step1/package.json @@ -0,0 +1,7 @@ +{ + "name": "aliases", + "license": "Apache-2.0", + "peerDependencies": { + "@pulumi/pulumi": "latest" + } +} diff --git a/tests/integration/aliases/nodejs/retype_component_child/step2/index.ts b/tests/integration/aliases/nodejs/retype_component_child/step2/index.ts new file mode 100644 index 000000000000..7c46a2be018d --- /dev/null +++ b/tests/integration/aliases/nodejs/retype_component_child/step2/index.ts @@ -0,0 +1,20 @@ +// Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import * as pulumi from "@pulumi/pulumi"; + +class FooResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + const aliasOpts = { aliases: [{ type: "my:module:FooResource" }] }; + opts = pulumi.mergeOptions(opts, aliasOpts); + super("my:module:FooResourceNew", name, {}, opts); + } +} + +class ComponentResource extends pulumi.ComponentResource { + constructor(name: string, opts?: pulumi.ComponentResourceOptions) { + super("my:module:ComponentResource", name, {}, opts); + new FooResource("child", { parent: this }); + } +} + +new ComponentResource("comp"); From 322e63e0a6b3cf3141af5df0d5189f7b4d57cfc0 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 16:49:49 -0700 Subject: [PATCH 11/20] Add aliases/python/adopt_component_child test --- tests/integration/aliases/aliases_py_test.go | 1 + .../adopt_component_child/step1/Pulumi.yaml | 3 +++ .../adopt_component_child/step1/__main__.py | 19 ++++++++++++++++++ .../step1/requirements.txt | 0 .../adopt_component_child/step2/__main__.py | 20 +++++++++++++++++++ 5 files changed, 43 insertions(+) create mode 100644 tests/integration/aliases/python/adopt_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/python/adopt_component_child/step1/__main__.py create mode 100644 tests/integration/aliases/python/adopt_component_child/step1/requirements.txt create mode 100644 tests/integration/aliases/python/adopt_component_child/step2/__main__.py diff --git a/tests/integration/aliases/aliases_py_test.go b/tests/integration/aliases/aliases_py_test.go index 68200d32e53b..2d8439ef9383 100644 --- a/tests/integration/aliases/aliases_py_test.go +++ b/tests/integration/aliases/aliases_py_test.go @@ -20,6 +20,7 @@ func TestPythonAliases(t *testing.T) { "retype_component", "rename_component", "retype_parents", + "adopt_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/python/adopt_component_child/step1/Pulumi.yaml b/tests/integration/aliases/python/adopt_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..2366ee2eaf41 --- /dev/null +++ b/tests/integration/aliases/python/adopt_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: aliases_adopt_component_child +description: A program that adopts a component child with an alias. +runtime: python diff --git a/tests/integration/aliases/python/adopt_component_child/step1/__main__.py b/tests/integration/aliases/python/adopt_component_child/step1/__main__.py new file mode 100644 index 000000000000..9a08afeeaf1b --- /dev/null +++ b/tests/integration/aliases/python/adopt_component_child/step1/__main__.py @@ -0,0 +1,19 @@ +# Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import pulumi + + +class FooResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:FooResource", name, None, opts) + + +class ComponentResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:ComponentResource", name, None, opts) + + +ComponentResource("comp") + + +FooResource("child") diff --git a/tests/integration/aliases/python/adopt_component_child/step1/requirements.txt b/tests/integration/aliases/python/adopt_component_child/step1/requirements.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/integration/aliases/python/adopt_component_child/step2/__main__.py b/tests/integration/aliases/python/adopt_component_child/step2/__main__.py new file mode 100644 index 000000000000..1cef2b4b033f --- /dev/null +++ b/tests/integration/aliases/python/adopt_component_child/step2/__main__.py @@ -0,0 +1,20 @@ +# Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import pulumi + + +class FooResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:FooResource", name, None, opts) + + +class ComponentResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:ComponentResource", name, None, opts) + FooResource("child", pulumi.ResourceOptions( + parent=self, + aliases=[pulumi.Alias(parent=pulumi.ROOT_STACK_RESOURCE)] + )) + + +ComponentResource("comp") From 200feb43c9cd9a5896c2b9e5e67f62ef41045688 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 16:50:00 -0700 Subject: [PATCH 12/20] Add aliases/python/extract_component_child test --- tests/integration/aliases/aliases_py_test.go | 1 + .../extract_component_child/step1/Pulumi.yaml | 3 +++ .../extract_component_child/step1/__main__.py | 17 +++++++++++++++ .../step1/requirements.txt | 0 .../extract_component_child/step2/__main__.py | 21 +++++++++++++++++++ 5 files changed, 42 insertions(+) create mode 100644 tests/integration/aliases/python/extract_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/python/extract_component_child/step1/__main__.py create mode 100644 tests/integration/aliases/python/extract_component_child/step1/requirements.txt create mode 100644 tests/integration/aliases/python/extract_component_child/step2/__main__.py diff --git a/tests/integration/aliases/aliases_py_test.go b/tests/integration/aliases/aliases_py_test.go index 2d8439ef9383..94fecdad7d51 100644 --- a/tests/integration/aliases/aliases_py_test.go +++ b/tests/integration/aliases/aliases_py_test.go @@ -21,6 +21,7 @@ func TestPythonAliases(t *testing.T) { "rename_component", "retype_parents", "adopt_component_child", + "extract_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/python/extract_component_child/step1/Pulumi.yaml b/tests/integration/aliases/python/extract_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..fa2b3f9afa72 --- /dev/null +++ b/tests/integration/aliases/python/extract_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: aliases_extract_component_child +description: A program that extracts a component child with an alias. +runtime: python diff --git a/tests/integration/aliases/python/extract_component_child/step1/__main__.py b/tests/integration/aliases/python/extract_component_child/step1/__main__.py new file mode 100644 index 000000000000..e714a9a72a90 --- /dev/null +++ b/tests/integration/aliases/python/extract_component_child/step1/__main__.py @@ -0,0 +1,17 @@ +# Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import pulumi + + +class FooResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:FooResource", name, None, opts) + + +class ComponentResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:ComponentResource", name, None, opts) + FooResource("child", pulumi.ResourceOptions(parent=self)) + + +ComponentResource("comp") diff --git a/tests/integration/aliases/python/extract_component_child/step1/requirements.txt b/tests/integration/aliases/python/extract_component_child/step1/requirements.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/integration/aliases/python/extract_component_child/step2/__main__.py b/tests/integration/aliases/python/extract_component_child/step2/__main__.py new file mode 100644 index 000000000000..a8c16830de1e --- /dev/null +++ b/tests/integration/aliases/python/extract_component_child/step2/__main__.py @@ -0,0 +1,21 @@ +# Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import pulumi + + +class FooResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:FooResource", name, None, opts) + + +class ComponentResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:ComponentResource", name, None, opts) + + +comp = ComponentResource("comp") + + +FooResource("child", pulumi.ResourceOptions( + aliases=[pulumi.Alias(parent=comp)] +)) From 8db3e05fabb803b0fbbc9d7ee98710c251893849 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 16:50:13 -0700 Subject: [PATCH 13/20] Add aliases/python/rename_component_child test --- tests/integration/aliases/aliases_py_test.go | 1 + .../rename_component_child/step1/Pulumi.yaml | 3 +++ .../rename_component_child/step1/__main__.py | 17 ++++++++++++++++ .../step1/requirements.txt | 0 .../rename_component_child/step2/__main__.py | 20 +++++++++++++++++++ 5 files changed, 41 insertions(+) create mode 100644 tests/integration/aliases/python/rename_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/python/rename_component_child/step1/__main__.py create mode 100644 tests/integration/aliases/python/rename_component_child/step1/requirements.txt create mode 100644 tests/integration/aliases/python/rename_component_child/step2/__main__.py diff --git a/tests/integration/aliases/aliases_py_test.go b/tests/integration/aliases/aliases_py_test.go index 94fecdad7d51..8baea19f563f 100644 --- a/tests/integration/aliases/aliases_py_test.go +++ b/tests/integration/aliases/aliases_py_test.go @@ -22,6 +22,7 @@ func TestPythonAliases(t *testing.T) { "retype_parents", "adopt_component_child", "extract_component_child", + "rename_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/python/rename_component_child/step1/Pulumi.yaml b/tests/integration/aliases/python/rename_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..dc1b917306a1 --- /dev/null +++ b/tests/integration/aliases/python/rename_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: aliases_rename_component_child +description: A program that renames a component child with an alias. +runtime: python diff --git a/tests/integration/aliases/python/rename_component_child/step1/__main__.py b/tests/integration/aliases/python/rename_component_child/step1/__main__.py new file mode 100644 index 000000000000..e714a9a72a90 --- /dev/null +++ b/tests/integration/aliases/python/rename_component_child/step1/__main__.py @@ -0,0 +1,17 @@ +# Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import pulumi + + +class FooResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:FooResource", name, None, opts) + + +class ComponentResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:ComponentResource", name, None, opts) + FooResource("child", pulumi.ResourceOptions(parent=self)) + + +ComponentResource("comp") diff --git a/tests/integration/aliases/python/rename_component_child/step1/requirements.txt b/tests/integration/aliases/python/rename_component_child/step1/requirements.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/integration/aliases/python/rename_component_child/step2/__main__.py b/tests/integration/aliases/python/rename_component_child/step2/__main__.py new file mode 100644 index 000000000000..cd4e52642f9d --- /dev/null +++ b/tests/integration/aliases/python/rename_component_child/step2/__main__.py @@ -0,0 +1,20 @@ +# Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import pulumi + + +class FooResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:FooResource", name, None, opts) + + +class ComponentResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:ComponentResource", name, None, opts) + FooResource("childrenamed", pulumi.ResourceOptions( + parent=self, + aliases=[pulumi.Alias(name="child")] + )) + + +ComponentResource("comp") From 59dc4be4533da4d209d27406b1643e84c1496e38 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 16:50:35 -0700 Subject: [PATCH 14/20] Add aliases/python/retype_component_child test --- tests/integration/aliases/aliases_py_test.go | 1 + .../retype_component_child/step1/Pulumi.yaml | 3 +++ .../retype_component_child/step1/__main__.py | 17 +++++++++++++++++ .../step1/requirements.txt | 0 .../retype_component_child/step2/__main__.py | 19 +++++++++++++++++++ 5 files changed, 40 insertions(+) create mode 100644 tests/integration/aliases/python/retype_component_child/step1/Pulumi.yaml create mode 100644 tests/integration/aliases/python/retype_component_child/step1/__main__.py create mode 100644 tests/integration/aliases/python/retype_component_child/step1/requirements.txt create mode 100644 tests/integration/aliases/python/retype_component_child/step2/__main__.py diff --git a/tests/integration/aliases/aliases_py_test.go b/tests/integration/aliases/aliases_py_test.go index 8baea19f563f..fd3d69cec2c3 100644 --- a/tests/integration/aliases/aliases_py_test.go +++ b/tests/integration/aliases/aliases_py_test.go @@ -23,6 +23,7 @@ func TestPythonAliases(t *testing.T) { "adopt_component_child", "extract_component_child", "rename_component_child", + "retype_component_child", } for _, dir := range dirs { diff --git a/tests/integration/aliases/python/retype_component_child/step1/Pulumi.yaml b/tests/integration/aliases/python/retype_component_child/step1/Pulumi.yaml new file mode 100644 index 000000000000..3ad3d828665e --- /dev/null +++ b/tests/integration/aliases/python/retype_component_child/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: aliases_retype_component_child +description: A program that retypes a component child with an alias. +runtime: python diff --git a/tests/integration/aliases/python/retype_component_child/step1/__main__.py b/tests/integration/aliases/python/retype_component_child/step1/__main__.py new file mode 100644 index 000000000000..e714a9a72a90 --- /dev/null +++ b/tests/integration/aliases/python/retype_component_child/step1/__main__.py @@ -0,0 +1,17 @@ +# Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import pulumi + + +class FooResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:FooResource", name, None, opts) + + +class ComponentResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:ComponentResource", name, None, opts) + FooResource("child", pulumi.ResourceOptions(parent=self)) + + +ComponentResource("comp") diff --git a/tests/integration/aliases/python/retype_component_child/step1/requirements.txt b/tests/integration/aliases/python/retype_component_child/step1/requirements.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/integration/aliases/python/retype_component_child/step2/__main__.py b/tests/integration/aliases/python/retype_component_child/step2/__main__.py new file mode 100644 index 000000000000..a70fe1ac0048 --- /dev/null +++ b/tests/integration/aliases/python/retype_component_child/step2/__main__.py @@ -0,0 +1,19 @@ +# Copyright 2016-2023, Pulumi Corporation. All rights reserved. + +import pulumi + + +class FooResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="my:module:FooResource")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) + super().__init__("my:module:FooResourceNew", name, None, opts) + + +class ComponentResource(pulumi.ComponentResource): + def __init__(self, name, opts=None): + super().__init__("my:module:ComponentResource", name, None, opts) + FooResource("child", pulumi.ResourceOptions(parent=self)) + + +ComponentResource("comp") From e77f9362aab60be2c9894157c968f75e12268470 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 14:33:36 -0700 Subject: [PATCH 15/20] Refactor: Split out `generateAliases` method Split out the "generate aliases" functionality from `generateSteps` to its own method, to make it possible to test just `generateAliases`. --- pkg/resource/deploy/step_generator.go | 41 +++++++++++++++------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/pkg/resource/deploy/step_generator.go b/pkg/resource/deploy/step_generator.go index 2c0ab8f1cbed..8acb8f8c451f 100644 --- a/pkg/resource/deploy/step_generator.go +++ b/pkg/resource/deploy/step_generator.go @@ -421,24 +421,7 @@ func (sg *stepGenerator) inheritedChildAlias( aliasName) } -func (sg *stepGenerator) generateSteps(event RegisterResourceEvent) ([]Step, result.Result) { - var invalid bool // will be set to true if this object fails validation. - - goal := event.Goal() - - // Some goal settings are based on the parent settings so make sure our parent is correct. - parent, res := sg.checkParent(goal.Parent, goal.Type) - if res != nil { - return nil, res - } - goal.Parent = parent - - urn, res := sg.generateURN(goal.Parent, goal.Type, goal.Name) - if res != nil { - return nil, res - } - - // Generate the aliases for this resource +func (sg *stepGenerator) generateAliases(goal *resource.Goal) map[resource.URN]struct{} { aliases := make(map[resource.URN]struct{}, 0) for _, alias := range goal.Aliases { urn := sg.collapseAliasToUrn(goal, alias) @@ -457,6 +440,28 @@ func (sg *stepGenerator) generateSteps(event RegisterResourceEvent) ([]Step, res } } } + return aliases +} + +func (sg *stepGenerator) generateSteps(event RegisterResourceEvent) ([]Step, result.Result) { + var invalid bool // will be set to true if this object fails validation. + + goal := event.Goal() + + // Some goal settings are based on the parent settings so make sure our parent is correct. + parent, res := sg.checkParent(goal.Parent, goal.Type) + if res != nil { + return nil, res + } + goal.Parent = parent + + urn, res := sg.generateURN(goal.Parent, goal.Type, goal.Name) + if res != nil { + return nil, res + } + + // Generate the aliases for this resource. + aliases := sg.generateAliases(goal) if previousAliasURN, alreadyAliased := sg.aliased[urn]; alreadyAliased { // This resource is claiming to be X but we've already seen another resource claim that via aliases From 7a8de79f122f7bc69ae85299a470755685a800e7 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 14:34:45 -0700 Subject: [PATCH 16/20] Tests for generateAliases Add some tests for the split-out `generateAliases` method. These tests fail without the fix in the engine. --- pkg/resource/deploy/step_generator_test.go | 121 +++++++++++++++++++++ 1 file changed, 121 insertions(+) diff --git a/pkg/resource/deploy/step_generator_test.go b/pkg/resource/deploy/step_generator_test.go index ae0187ab499d..f78471eebca7 100644 --- a/pkg/resource/deploy/step_generator_test.go +++ b/pkg/resource/deploy/step_generator_test.go @@ -360,3 +360,124 @@ func TestEngineDiff(t *testing.T) { }) } } + +func TestGenerateAliases(t *testing.T) { + t.Parallel() + + const ( + project = "project" + stack = "stack" + ) + + parentTypeAlias := resource.CreateURN("myres", "test:resource:type2", "", project, stack) + parentNameAlias := resource.CreateURN("myres2", "test:resource:type", "", project, stack) + + cases := []struct { + name string + parentAlias *resource.URN + childAliases []resource.Alias + expected map[resource.URN]struct{} + }{ + { + name: "no aliases", + expected: map[resource.URN]struct{}{}, + }, + { + name: "child alias (type), no parent aliases", + childAliases: []resource.Alias{ + {Type: "test:resource:child2"}, + }, + expected: map[resource.URN]struct{}{ + "urn:pulumi:stack::project::test:resource:type$test:resource:child2::myres-child": {}, + }, + }, + { + name: "child alias (name), no parent aliases", + childAliases: []resource.Alias{ + {Name: "child2"}, + }, + expected: map[resource.URN]struct{}{ + "urn:pulumi:stack::project::test:resource:type$test:resource:child::child2": {}, + }, + }, + { + name: "child alias (type, noParent), no parent aliases", + childAliases: []resource.Alias{ + { + Type: "test:resource:child2", + NoParent: true, + }, + }, + expected: map[resource.URN]struct{}{ + "urn:pulumi:stack::project::test:resource:child2::myres-child": {}, + }, + }, + { + name: "child alias (type, parent), no parent aliases", + childAliases: []resource.Alias{ + { + Type: "test:resource:child2", + Parent: resource.CreateURN("originalparent", "test:resource:original", "", project, stack), + }, + }, + expected: map[resource.URN]struct{}{ + "urn:pulumi:stack::project::test:resource:original$test:resource:child2::myres-child": {}, + }, + }, + { + name: "child alias (name), parent alias (type)", + parentAlias: &parentTypeAlias, + childAliases: []resource.Alias{ + {Name: "myres-child2"}, + }, + expected: map[resource.URN]struct{}{ + "urn:pulumi:stack::project::test:resource:type$test:resource:child::myres-child2": {}, + "urn:pulumi:stack::project::test:resource:type2$test:resource:child::myres-child": {}, + "urn:pulumi:stack::project::test:resource:type2$test:resource:child::myres-child2": {}, + }, + }, + { + name: "child alias (name), parent alias (name)", + parentAlias: &parentNameAlias, + childAliases: []resource.Alias{ + {Name: "myres-child2"}, + }, + expected: map[resource.URN]struct{}{ + "urn:pulumi:stack::project::test:resource:type$test:resource:child::myres-child2": {}, + "urn:pulumi:stack::project::test:resource:type$test:resource:child::myres2-child": {}, + "urn:pulumi:stack::project::test:resource:type$test:resource:child::myres2-child2": {}, + }, + }, + } + + for _, tt := range cases { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + parentURN := resource.CreateURN("myres", "test:resource:type", "", project, stack) + goal := &resource.Goal{ + Parent: parentURN, + Name: "myres-child", + Type: "test:resource:child", + Aliases: tt.childAliases, + } + + sg := newStepGenerator(&Deployment{ + target: &Target{ + Name: stack, + }, + source: NewNullSource(project), + }, Options{}, NewUrnTargets(nil), NewUrnTargets(nil)) + + if tt.parentAlias != nil { + sg.aliases = map[resource.URN]resource.URN{ + parentURN: *tt.parentAlias, + } + } + + actual := sg.generateAliases(goal) + assert.Equal(t, tt.expected, actual) + }) + } +} From 64a228888311b634847cc3f052d4fe7318e7408b Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Mon, 1 May 2023 14:36:32 -0700 Subject: [PATCH 17/20] [engine] Fix aliasing children There is an issue with how the engine computes the aliases when the resource is a child and doesn't have `Parent` set on the alias spec (and the parent doesn't have any aliases). ```python class FooResource(pulumi.ComponentResource): def __init__(self, name, opts=None): super().__init__("my:module:FooResource", name, None, opts) class ComponentResource(pulumi.ComponentResource): def __init__(self, name, opts=None): super().__init__("my:module:ComponentResource", name, None, opts) FooResource("childrenamed", pulumi.ResourceOptions( parent=self, aliases=[pulumi.Alias(name="child")] )) ``` In the example above, `ComponentResource` has a child `FooResource` which was renamed from `child` to `childrenamed`. The engine does not compute the correct alias: ``` expected: urn:pulumi:stack::project::my:module:ComponentResource$my:module:FooResource::child actual: urn:pulumi:stack::project::my:module:FooResource::child ``` The problem is due to: https://github.com/pulumi/pulumi/blob/117955ce14b6cf2dd093f8356ec7e26427aca4bf/pkg/resource/deploy/step_generator.go#L370-L382 ... and: https://github.com/pulumi/pulumi/blob/117955ce14b6cf2dd093f8356ec7e26427aca4bf/sdk/go/common/resource/alias.go#L24-L26 Because the alias spec doesn't have `parent` specified, the parent type is not being included the computed alias URN. Existing tests such as https://github.com/pulumi/pulumi/tree/master/tests/integration/aliases/python/rename_component_and_child didn't catch the problem because the alias specifies both the `name` and `parent`: https://github.com/pulumi/pulumi/blob/117955ce14b6cf2dd093f8356ec7e26427aca4bf/tests/integration/aliases/python/rename_component_and_child/step2/__main__.py#L15 In this case, specifying `parent` on the alias shouldn't be necessary. However, even after removing `parent` from the alias spec, the test still succeeds because the parent itself has an alias: https://github.com/pulumi/pulumi/blob/117955ce14b6cf2dd093f8356ec7e26427aca4bf/tests/integration/aliases/python/rename_component_and_child/step2/__main__.py#L18 ... and parent aliases are inherited as part of a child's aliases, so we still get an alias that works from the inheritance. If we change the test to make no changes to the parent such that it doesn't have any aliases, then we get the failure as we'd expect. A similar problem will happen when retyping a child. **Fix** The fix involves using the child's parent in the calculated alias URN when `Parent` isn't specified for the alias. As part of this, we need to properly handled `NoParent` because right now the engine is not correctly using it. The struct representing an alias in the engine does not have a `NoParent` field: https://github.com/pulumi/pulumi/blob/117955ce14b6cf2dd093f8356ec7e26427aca4bf/sdk/go/common/resource/alias.go#L8-L15 And therefore does not copy it over in the gRPC request: https://github.com/pulumi/pulumi/blob/117955ce14b6cf2dd093f8356ec7e26427aca4bf/pkg/resource/deploy/source_eval.go#L1082-L1088 Instead, the `Alias` struct has an incorrect `NoParent` method which returns `true` if the `Parent` field has a value of `""`: https://github.com/pulumi/pulumi/blob/117955ce14b6cf2dd093f8356ec7e26427aca4bf/sdk/go/common/resource/alias.go#L24-L26 --- ...230508--engine--fix-aliasing-children.yaml | 4 ++++ .../deploy/deploytest/resourcemonitor.go | 4 ++-- pkg/resource/deploy/source_eval.go | 11 +++++----- pkg/resource/deploy/step_generator.go | 21 +++++++------------ sdk/go/common/resource/alias.go | 17 +++++++-------- 5 files changed, 27 insertions(+), 30 deletions(-) create mode 100644 changelog/pending/20230508--engine--fix-aliasing-children.yaml diff --git a/changelog/pending/20230508--engine--fix-aliasing-children.yaml b/changelog/pending/20230508--engine--fix-aliasing-children.yaml new file mode 100644 index 000000000000..348335107d9c --- /dev/null +++ b/changelog/pending/20230508--engine--fix-aliasing-children.yaml @@ -0,0 +1,4 @@ +changes: +- type: fix + scope: engine + description: Fix aliasing children diff --git a/pkg/resource/deploy/deploytest/resourcemonitor.go b/pkg/resource/deploy/deploytest/resourcemonitor.go index 03d73a7b0423..4958266de9b9 100644 --- a/pkg/resource/deploy/deploytest/resourcemonitor.go +++ b/pkg/resource/deploy/deploytest/resourcemonitor.go @@ -156,8 +156,8 @@ func (rm *ResourceMonitor) RegisterResource(t tokens.Type, name string, custom b Project: a.Project, Stack: a.Stack, } - if a.NoParent() { - alias.Parent = &pulumirpc.Alias_Spec_NoParent{NoParent: a.NoParent()} + if a.NoParent { + alias.Parent = &pulumirpc.Alias_Spec_NoParent{NoParent: a.NoParent} } else if a.Parent != "" { alias.Parent = &pulumirpc.Alias_Spec_ParentUrn{ParentUrn: string(a.Parent)} } diff --git a/pkg/resource/deploy/source_eval.go b/pkg/resource/deploy/source_eval.go index f15d456b30dd..d933f39fd98d 100644 --- a/pkg/resource/deploy/source_eval.go +++ b/pkg/resource/deploy/source_eval.go @@ -1093,11 +1093,12 @@ func (rm *resmon) RegisterResource(ctx context.Context, var alias resource.Alias if aliasSpec != nil { alias = resource.Alias{ - Name: aliasSpec.Name, - Type: aliasSpec.Type, - Stack: aliasSpec.Stack, - Project: aliasSpec.Project, - Parent: resource.URN(aliasSpec.GetParentUrn()), + Name: aliasSpec.Name, + Type: aliasSpec.Type, + Stack: aliasSpec.Stack, + Project: aliasSpec.Project, + Parent: resource.URN(aliasSpec.GetParentUrn()), + NoParent: aliasSpec.GetNoParent(), } } else { alias = resource.Alias{ diff --git a/pkg/resource/deploy/step_generator.go b/pkg/resource/deploy/step_generator.go index 8acb8f8c451f..8eaef78a0eb3 100644 --- a/pkg/resource/deploy/step_generator.go +++ b/pkg/resource/deploy/step_generator.go @@ -360,18 +360,13 @@ func (sg *stepGenerator) collapseAliasToUrn(goal *resource.Goal, alias resource. t = string(goal.Type) } - var parentType tokens.Type - // If alias.NoParent is true then parentType is blank, else we need to look if a parent URN is given - if !alias.NoParent() { - parentURN := alias.Parent - if parentURN == "" { - parentURN = goal.Parent - } - - if parentURN != "" && parentURN.Type() != resource.RootStackType { - // Skip empty parents and don't use the root stack type; otherwise, use the full qualified type. - parentType = parentURN.QualifiedType() - } + parent := alias.Parent + if parent == "" { + parent = goal.Parent + } + parentIsRootStack := parent != "" && parent.Type() == resource.RootStackType + if alias.NoParent || parentIsRootStack { + parent = "" } project := alias.Project @@ -383,7 +378,7 @@ func (sg *stepGenerator) collapseAliasToUrn(goal *resource.Goal, alias resource. stack = sg.deployment.Target().Name.String() } - return resource.NewURN(tokens.QName(stack), tokens.PackageName(project), parentType, tokens.Type(t), tokens.QName(n)) + return resource.CreateURN(n, t, parent, project, stack) } // inheritedChildAlias computes the alias that should be applied to a child based on an alias applied to it's diff --git a/sdk/go/common/resource/alias.go b/sdk/go/common/resource/alias.go index 831c2c06799b..d46ed3d1994a 100644 --- a/sdk/go/common/resource/alias.go +++ b/sdk/go/common/resource/alias.go @@ -6,12 +6,13 @@ import ( ) type Alias struct { - URN URN - Name string - Type string - Project string - Stack string - Parent URN + URN URN + Name string + Type string + Project string + Stack string + Parent URN + NoParent bool } func (a *Alias) GetURN() URN { @@ -21,10 +22,6 @@ func (a *Alias) GetURN() URN { return CreateURN(a.Name, a.Type, a.Parent, a.Project, a.Stack) } -func (a *Alias) NoParent() bool { - return a.Parent == "" -} - // CreateURN computes a URN from the combination of a resource name, resource type, and optional parent, func CreateURN(name string, t string, parent URN, project string, stack string) URN { createURN := func(parent URN, stack string, project string, t string, name string) URN { From 49b60e704087a9461286420e46531466577933fc Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Fri, 5 May 2023 16:45:34 -0700 Subject: [PATCH 18/20] [sdk/nodejs] Fix Parent/NoParent aliases The Node.js SDK is not sending the right `Parent` and `NoParent` alias spec. https://github.com/pulumi/pulumi/blob/117955ce14b6cf2dd093f8356ec7e26427aca4bf/sdk/nodejs/runtime/resource.ts#L332-L361 - It does not set `NoParent` when it should, but instead sets `Parent` to empty. - It sets `NoParent` to true and leaves `Parent` empty when both the alias and resource have no `Parent` specified. - If the resource has a parent and `Parent` isn't set on the alias, it sends the parent's URN for the `Parent`. This commit fixes these issues so that the Node.js SDK sends correctly specified alias specs. However, we continue to set the alias's `Parent` to the resource's parent if the alias does not specify a `Parent`. We shouldn't have to do this, but doing it allows us to maintain backwards compatibility in the case when the Node.js SDK is upgraded, but not the CLI. --- ...k-nodejs--fix-parent-noparent-aliases.yaml | 4 ++++ sdk/nodejs/runtime/resource.ts | 24 +++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 changelog/pending/20230508--sdk-nodejs--fix-parent-noparent-aliases.yaml diff --git a/changelog/pending/20230508--sdk-nodejs--fix-parent-noparent-aliases.yaml b/changelog/pending/20230508--sdk-nodejs--fix-parent-noparent-aliases.yaml new file mode 100644 index 000000000000..4667d8ed9277 --- /dev/null +++ b/changelog/pending/20230508--sdk-nodejs--fix-parent-noparent-aliases.yaml @@ -0,0 +1,4 @@ +changes: +- type: fix + scope: sdk/nodejs + description: Fix Parent/NoParent aliases diff --git a/sdk/nodejs/runtime/resource.ts b/sdk/nodejs/runtime/resource.ts index e1fcc5074c08..f48c4ad847d5 100644 --- a/sdk/nodejs/runtime/resource.ts +++ b/sdk/nodejs/runtime/resource.ts @@ -341,17 +341,27 @@ function mapAliasesForRequest(aliases: (URN | Alias)[] | undefined, parentURN?: newAlias.setUrn(a); } else { const newAliasSpec = new aliasproto.Alias.Spec(); - const noParent = !a.hasOwnProperty("parent") && !parentURN; newAliasSpec.setName(a.name); newAliasSpec.setType(a.type); newAliasSpec.setStack(a.stack); newAliasSpec.setProject(a.project); - if (noParent) { - newAliasSpec.setNoparent(noParent); - } else { - const aliasParentUrn = a.hasOwnProperty("parent") ? getParentURN(a.parent) : output(parentURN); - const urn = await aliasParentUrn.promise(); - newAliasSpec.setParenturn(urn); + if (a.hasOwnProperty("parent")) { + if (a.parent === undefined) { + newAliasSpec.setNoparent(true); + } else { + const aliasParentUrn = getParentURN(a.parent); + const urn = await aliasParentUrn.promise(); + newAliasSpec.setParenturn(urn); + } + } else if (parentURN) { + // If a parent isn't specified for the alias and the resource has a parent, + // pass along the resource's parent in the alias spec. + // It shouldn't be necessary to do this because the engine should fill-in the + // resource's parent if one wasn't specified for the alias. + // However, some older versions of the CLI don't do this correctly, and this + // SDK has always passed along the parent in this way, so we continue doing it + // to maintain compatibility with these versions of the CLI. + newAliasSpec.setParenturn(parentURN); } newAlias.setSpec(newAliasSpec); } From c7e0e3d1b43a15095d957648bf8d6ea2da2b94e2 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Wed, 14 Jun 2023 05:16:45 -0700 Subject: [PATCH 19/20] Factor out `updateProgramWithResource` from Alias tests Both alias tests use the same `upgradeProgramWithResources` local. Factor it out into a top-level function that both can reuse rather than duplicating the code. We'll be reusing this in another alias test added in a subsequent commit. --- pkg/engine/lifecycletest/pulumi_test.go | 102 ++++++++---------------- 1 file changed, 34 insertions(+), 68 deletions(-) diff --git a/pkg/engine/lifecycletest/pulumi_test.go b/pkg/engine/lifecycletest/pulumi_test.go index 77257da0d041..227b599cdde9 100644 --- a/pkg/engine/lifecycletest/pulumi_test.go +++ b/pkg/engine/lifecycletest/pulumi_test.go @@ -1496,29 +1496,14 @@ func registerResources(t *testing.T, monitor *deploytest.ResourceMonitor, resour return nil } -func TestAliases(t *testing.T) { - t.Parallel() - - loaders := []*deploytest.ProviderLoader{ - deploytest.NewProviderLoader("pkgA", semver.MustParse("1.0.0"), func() (plugin.Provider, error) { - return &deploytest.Provider{ - // The `forcesReplacement` key forces replacement and all other keys can update in place - DiffF: func(res resource.URN, id resource.ID, olds, news resource.PropertyMap, - ignoreChanges []string, - ) (plugin.DiffResult, error) { - replaceKeys := []resource.PropertyKey{} - old, hasOld := olds["forcesReplacement"] - new, hasNew := news["forcesReplacement"] - if hasOld && !hasNew || hasNew && !hasOld || hasOld && hasNew && old.Diff(new) != nil { - replaceKeys = append(replaceKeys, "forcesReplacement") - } - return plugin.DiffResult{ReplaceKeys: replaceKeys}, nil - }, - }, nil - }), - } - - updateProgramWithResource := func( +type updateProgramWithResourceFunc func(*deploy.Snapshot, []Resource, []display.StepOp, bool) *deploy.Snapshot + +func createUpdateProgramWithResourceFuncForAliasTests( + t *testing.T, + loaders []*deploytest.ProviderLoader, +) updateProgramWithResourceFunc { + t.Helper() + return func( snap *deploy.Snapshot, resources []Resource, allowedOps []display.StepOp, expectFailure bool, ) *deploy.Snapshot { program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error { @@ -1563,6 +1548,31 @@ func TestAliases(t *testing.T) { } return p.Run(t, snap) } +} + +func TestAliases(t *testing.T) { + t.Parallel() + + loaders := []*deploytest.ProviderLoader{ + deploytest.NewProviderLoader("pkgA", semver.MustParse("1.0.0"), func() (plugin.Provider, error) { + return &deploytest.Provider{ + // The `forcesReplacement` key forces replacement and all other keys can update in place + DiffF: func(res resource.URN, id resource.ID, olds, news resource.PropertyMap, + ignoreChanges []string, + ) (plugin.DiffResult, error) { + replaceKeys := []resource.PropertyKey{} + old, hasOld := olds["forcesReplacement"] + new, hasNew := news["forcesReplacement"] + if hasOld && !hasNew || hasNew && !hasOld || hasOld && hasNew && old.Diff(new) != nil { + replaceKeys = append(replaceKeys, "forcesReplacement") + } + return plugin.DiffResult{ReplaceKeys: replaceKeys}, nil + }, + }, nil + }), + } + + updateProgramWithResource := createUpdateProgramWithResourceFuncForAliasTests(t, loaders) snap := updateProgramWithResource(nil, []Resource{{ t: "pkgA:index:t1", @@ -2014,51 +2024,7 @@ func TestAliasURNs(t *testing.T) { }), } - updateProgramWithResource := func( - snap *deploy.Snapshot, resources []Resource, allowedOps []display.StepOp, expectFailure bool, - ) *deploy.Snapshot { - program := deploytest.NewLanguageRuntime(func(_ plugin.RunInfo, monitor *deploytest.ResourceMonitor) error { - err := registerResources(t, monitor, resources) - return err - }) - host := deploytest.NewPluginHost(nil, nil, program, loaders...) - p := &TestPlan{ - Options: UpdateOptions{Host: host}, - Steps: []TestStep{ - { - Op: Update, - ExpectFailure: expectFailure, - Validate: func(project workspace.Project, target deploy.Target, entries JournalEntries, - events []Event, res result.Result, - ) result.Result { - for _, event := range events { - if event.Type == ResourcePreEvent { - payload := event.Payload().(ResourcePreEventPayload) - assert.Subset(t, allowedOps, []display.StepOp{payload.Metadata.Op}) - } - } - - for _, entry := range entries { - if entry.Step.Type() == "pulumi:providers:pkgA" { - continue - } - switch entry.Kind { - case JournalEntrySuccess: - assert.Subset(t, allowedOps, []display.StepOp{entry.Step.Op()}) - case JournalEntryFailure: - assert.Fail(t, "unexpected failure in journal") - case JournalEntryBegin: - case JournalEntryOutputs: - } - } - - return res - }, - }, - }, - } - return p.Run(t, snap) - } + updateProgramWithResource := createUpdateProgramWithResourceFuncForAliasTests(t, loaders) snap := updateProgramWithResource(nil, []Resource{{ t: "pkgA:index:t1", From f5b117505cacea3545e90f63777b102903cc147a Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Wed, 31 May 2023 15:37:59 -0700 Subject: [PATCH 20/20] Maintain alias compat for older Node.js SDKs on new CLIs This change updates the engine to detect if a `RegisterResource` request is coming from an older Node.js SDK that is using incorrect alias specs and, if so, transforms the aliases to be correct. This allows us to maintain compatibility for users who have upgraded their CLI but are still using an older version of the Node.js SDK with incorrect alias specs. We detect if the request is from a Node.js SDK by looking at the gRPC request's metadata headers, specifically looking at the "pulumi-runtime" and "user-agent" headers. First, if the request has a "pulumi-runtime" header with a value of "nodejs", we know it's coming from the Node.js plugin. The Node.js language plugin proxies gRPC calls from the Node.js SDK to the resource monitor and the proxy now sets the "pulumi-runtime" header to "nodejs" for `RegisterResource` calls. Second, if the request has a "user-agent" header that starts with "grpc-node-js/", we know it's coming from the Node.js SDK. This is the case for inline programs in the automation API, which connects directly to the resource monitor, rather than going through the language plugin's proxy. We can't just look at "user-agent", because in the proxy case it will have a Go-specific "user-agent". Updated Node.js SDKs set a new `aliasSpecs` field on the `RegisterResource` request, which indicates that the alias specs are correct, and no transforms are needed. --- pkg/engine/lifecycletest/pulumi_test.go | 93 ++++++++++++++ .../deploy/deploytest/resourcemonitor.go | 11 +- pkg/resource/deploy/source_eval.go | 50 ++++++++ pkg/resource/deploy/source_eval_test.go | 120 ++++++++++++++++++ proto/.checksum.txt | 2 +- proto/pulumi/resource.proto | 9 ++ .../cmd/pulumi-language-nodejs/proxy.go | 6 + sdk/nodejs/proto/resource_pb.js | 32 ++++- sdk/nodejs/runtime/resource.ts | 1 + sdk/proto/go/resource.pb.go | 21 ++- .../lib/pulumi/runtime/proto/resource_pb2.py | 44 +++---- .../lib/pulumi/runtime/proto/resource_pb2.pyi | 13 +- 12 files changed, 374 insertions(+), 28 deletions(-) diff --git a/pkg/engine/lifecycletest/pulumi_test.go b/pkg/engine/lifecycletest/pulumi_test.go index 227b599cdde9..a41ed1fbf7b7 100644 --- a/pkg/engine/lifecycletest/pulumi_test.go +++ b/pkg/engine/lifecycletest/pulumi_test.go @@ -1473,6 +1473,9 @@ type Resource struct { dependencies []resource.URN parent resource.URN deleteBeforeReplace bool + + aliasSpecs bool + grpcRequestHeaders map[string]string } func registerResources(t *testing.T, monitor *deploytest.ResourceMonitor, resources []Resource) error { @@ -1484,6 +1487,8 @@ func registerResources(t *testing.T, monitor *deploytest.ResourceMonitor, resour DeleteBeforeReplace: &r.deleteBeforeReplace, AliasURNs: r.aliasURNs, Aliases: r.aliases, + AliasSpecs: r.aliasSpecs, + GrpcRequestHeaders: r.grpcRequestHeaders, }) if err != nil { return err @@ -2002,6 +2007,94 @@ func TestAliases(t *testing.T) { }}, []display.StepOp{deploy.OpSame}, false) } +func TestAliasesNodeJSBackCompat(t *testing.T) { + t.Parallel() + + loaders := []*deploytest.ProviderLoader{ + deploytest.NewProviderLoader("pkgA", semver.MustParse("1.0.0"), func() (plugin.Provider, error) { + return &deploytest.Provider{}, nil + }), + } + + updateProgramWithResource := createUpdateProgramWithResourceFuncForAliasTests(t, loaders) + + tests := []struct { + name string + aliasSpecs bool + grpcRequestHeaders map[string]string + noParentAlias resource.Alias + }{ + { + name: "Old Node SDK", + grpcRequestHeaders: map[string]string{"pulumi-runtime": "nodejs"}, + // Old Node.js SDKs set Parent to "" rather than setting NoParent to true, + noParentAlias: resource.Alias{Parent: ""}, + }, + { + name: "New Node SDK", + grpcRequestHeaders: map[string]string{"pulumi-runtime": "nodejs"}, + // Indicate we're sending alias specs correctly. + aliasSpecs: true, + // Properly set NoParent to true. + noParentAlias: resource.Alias{NoParent: true}, + }, + { + name: "Unknown SDK", + // Properly set NoParent to true. + noParentAlias: resource.Alias{NoParent: true}, + }, + } + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + snap := updateProgramWithResource(nil, []Resource{{ + t: "pkgA:index:t1", + name: "one", + aliasSpecs: tt.aliasSpecs, + grpcRequestHeaders: tt.grpcRequestHeaders, + }, { + t: "pkgA:index:t2", + name: "two", + aliasSpecs: tt.aliasSpecs, + grpcRequestHeaders: tt.grpcRequestHeaders, + }}, []display.StepOp{deploy.OpCreate}, false) + + // Now make "two" a child of "one" ensuring no changes. + snap = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:t1", + name: "one", + aliasSpecs: tt.aliasSpecs, + grpcRequestHeaders: tt.grpcRequestHeaders, + }, { + t: "pkgA:index:t2", + parent: "urn:pulumi:test::test::pkgA:index:t1::one", + name: "two", + aliases: []resource.Alias{ + tt.noParentAlias, + }, + aliasSpecs: tt.aliasSpecs, + grpcRequestHeaders: tt.grpcRequestHeaders, + }}, []display.StepOp{deploy.OpSame}, false) + + // Now remove the parent relationship. + _ = updateProgramWithResource(snap, []Resource{{ + t: "pkgA:index:t1", + name: "one", + }, { + t: "pkgA:index:t2", + name: "two", + aliases: []resource.Alias{ + {Parent: "urn:pulumi:test::test::pkgA:index:t1::one"}, + }, + aliasSpecs: tt.aliasSpecs, + grpcRequestHeaders: tt.grpcRequestHeaders, + }}, []display.StepOp{deploy.OpSame}, false) + }) + } +} + func TestAliasURNs(t *testing.T) { t.Parallel() diff --git a/pkg/resource/deploy/deploytest/resourcemonitor.go b/pkg/resource/deploy/deploytest/resourcemonitor.go index 4958266de9b9..7afcba423d5d 100644 --- a/pkg/resource/deploy/deploytest/resourcemonitor.go +++ b/pkg/resource/deploy/deploytest/resourcemonitor.go @@ -27,6 +27,7 @@ import ( pulumirpc "github.com/pulumi/pulumi/sdk/v3/proto/go" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/metadata" ) type ResourceMonitor struct { @@ -108,9 +109,11 @@ type ResourceOptions struct { Remote bool Providers map[string]string AdditionalSecretOutputs []resource.PropertyKey + AliasSpecs bool DisableSecrets bool DisableResourceReferences bool + GrpcRequestHeaders map[string]string } func (rm *ResourceMonitor) RegisterResource(t tokens.Type, name string, custom bool, @@ -228,10 +231,16 @@ func (rm *ResourceMonitor) RegisterResource(t tokens.Type, name string, custom b AdditionalSecretOutputs: additionalSecretOutputs, Aliases: aliasObjects, DeletedWith: string(opts.DeletedWith), + AliasSpecs: opts.AliasSpecs, + } + + ctx := context.Background() + if len(opts.GrpcRequestHeaders) > 0 { + ctx = metadata.NewOutgoingContext(ctx, metadata.New(opts.GrpcRequestHeaders)) } // submit request - resp, err := rm.resmon.RegisterResource(context.Background(), requestInput) + resp, err := rm.resmon.RegisterResource(ctx, requestInput) if err != nil { return "", "", nil, err } diff --git a/pkg/resource/deploy/source_eval.go b/pkg/resource/deploy/source_eval.go index d933f39fd98d..37c73fea68cd 100644 --- a/pkg/resource/deploy/source_eval.go +++ b/pkg/resource/deploy/source_eval.go @@ -30,6 +30,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" "github.com/pulumi/pulumi/pkg/v3/resource/deploy/providers" interceptors "github.com/pulumi/pulumi/pkg/v3/util/rpcdebug" @@ -1006,6 +1007,45 @@ func inheritFromParent(child resource.Goal, parent resource.Goal) *resource.Goal return &goal } +// requestFromNodeJS returns true if the request is coming from a Node.js language runtime +// or SDK. This is determined by checking if the request has a "pulumi-runtime" metadata +// header with a value of "nodejs". If no "pulumi-runtime" header is present, then it +// checks if the request has a "user-agent" metadata header that has a value that starts +// with "grpc-node-js/". +func requestFromNodeJS(ctx context.Context) bool { + if md, hasMetadata := metadata.FromIncomingContext(ctx); hasMetadata { + // Check for the "pulumi-runtime" header first. + // We'll always respect this header value when present. + if runtime, ok := md["pulumi-runtime"]; ok { + return len(runtime) == 1 && runtime[0] == "nodejs" + } + // Otherwise, check the "user-agent" header. + if ua, ok := md["user-agent"]; ok { + return len(ua) == 1 && strings.HasPrefix(ua[0], "grpc-node-js/") + } + } + return false +} + +// transformAliasForNodeJSCompat transforms the alias from the legacy Node.js values to properly specified values. +func transformAliasForNodeJSCompat(alias resource.Alias) resource.Alias { + contract.Assertf(alias.URN == "", "alias.URN must be empty") + // The original implementation in the Node.js SDK did not specify aliases correctly: + // + // - It did not set NoParent when it should have, but instead set Parent to empty. + // - It set NoParent to true and left Parent empty when both the alias and resource had no Parent specified. + // + // To maintain compatibility with such versions of the Node.js SDK, we transform these incorrectly + // specified aliases into properly specified ones that work with this implementation of the engine: + // + // - { Parent: "", NoParent: false } -> { Parent: "", NoParent: true } + // - { Parent: "", NoParent: true } -> { Parent: "", NoParent: false } + if alias.Parent == "" { + alias.NoParent = !alias.NoParent + } + return alias +} + // RegisterResource is invoked by a language process when a new resource has been allocated. func (rm *resmon) RegisterResource(ctx context.Context, req *pulumirpc.RegisterResourceRequest, @@ -1088,6 +1128,13 @@ func (rm *resmon) RegisterResource(ctx context.Context, aliases = append(aliases, resource.Alias{URN: resource.URN(aliasURN)}) } + // We assume aliases are properly specified. However, if a request hasn't explicitly + // indicated that it is using properly specified aliases and the request is coming + // from Node.js, transform the aliases from the incorrect Node.js values to properly + // specified values, to maintain backward compatibility for users of older Node.js + // SDKs that aren't sending properly specified aliases. + transformAliases := !req.GetAliasSpecs() && requestFromNodeJS(ctx) + for _, aliasObject := range req.GetAliases() { aliasSpec := aliasObject.GetSpec() var alias resource.Alias @@ -1100,6 +1147,9 @@ func (rm *resmon) RegisterResource(ctx context.Context, Parent: resource.URN(aliasSpec.GetParentUrn()), NoParent: aliasSpec.GetNoParent(), } + if transformAliases { + alias = transformAliasForNodeJSCompat(alias) + } } else { alias = resource.Alias{ URN: resource.URN(aliasObject.GetUrn()), diff --git a/pkg/resource/deploy/source_eval_test.go b/pkg/resource/deploy/source_eval_test.go index e73fcb442bac..15193378435b 100644 --- a/pkg/resource/deploy/source_eval_test.go +++ b/pkg/resource/deploy/source_eval_test.go @@ -25,6 +25,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "google.golang.org/grpc/metadata" "github.com/pulumi/pulumi/pkg/v3/resource/deploy/deploytest" "github.com/pulumi/pulumi/pkg/v3/resource/deploy/providers" @@ -1164,3 +1165,122 @@ func TestResourceInheritsOptionsFromParent(t *testing.T) { }) } } + +func TestRequestFromNodeJS(t *testing.T) { + t.Parallel() + + ctx := context.Background() + newContext := func(md map[string]string) context.Context { + return metadata.NewIncomingContext(ctx, metadata.New(md)) + } + + tests := []struct { + name string + ctx context.Context + expected bool + }{ + { + name: "no metadata", + ctx: ctx, + expected: false, + }, + { + name: "empty metadata", + ctx: newContext(map[string]string{}), + expected: false, + }, + { + name: "user-agent foo/1.0", + ctx: newContext(map[string]string{"user-agent": "foo/1.0"}), + expected: false, + }, + { + name: "user-agent grpc-node-js/1.8.15", + ctx: newContext(map[string]string{"user-agent": "grpc-node-js/1.8.15"}), + expected: true, + }, + { + name: "pulumi-runtime foo", + ctx: newContext(map[string]string{"pulumi-runtime": "foo"}), + expected: false, + }, + { + name: "pulumi-runtime nodejs", + ctx: newContext(map[string]string{"pulumi-runtime": "nodejs"}), + expected: true, + }, + { + // Always respect the value of pulumi-runtime, regardless of the user-agent. + name: "user-agent grpc-go/1.54.0, pulumi-runtime nodejs", + ctx: newContext(map[string]string{ + "user-agent": "grpc-go/1.54.0", + "pulumi-runtime": "nodejs", + }), + expected: true, + }, + { + name: "user-agent grpc-node-js/1.8.15, pulumi-runtime python", + ctx: newContext(map[string]string{ + "user-agent": "grpc-node-js/1.8.15", + "pulumi-runtime": "python", + }), + expected: false, + }, + } + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + actual := requestFromNodeJS(tt.ctx) + assert.Equal(t, tt.expected, actual) + }) + } +} + +func TestTransformAliasForNodeJSCompat(t *testing.T) { + t.Parallel() + tests := []struct { + name string + input resource.Alias + expected resource.Alias + }{ + { + name: `{Parent: "", NoParent: true} (transformed)`, + input: resource.Alias{Parent: "", NoParent: true}, + expected: resource.Alias{Parent: "", NoParent: false}, + }, + { + name: `{Parent: "", NoParent: false} (transformed)`, + input: resource.Alias{Parent: "", NoParent: false}, + expected: resource.Alias{Parent: "", NoParent: true}, + }, + { + name: `{Parent: "", NoParent: false, Name: "name"} (transformed)`, + input: resource.Alias{Parent: "", NoParent: false, Name: "name"}, + expected: resource.Alias{Parent: "", NoParent: true, Name: "name"}, + }, + { + name: `{Parent: "", NoParent: true, Name: "name"} (transformed)`, + input: resource.Alias{Parent: "", NoParent: true, Name: "name"}, + expected: resource.Alias{Parent: "", NoParent: false, Name: "name"}, + }, + { + name: `{Parent: "foo", NoParent: false} (no transform)`, + input: resource.Alias{Parent: "foo", NoParent: false}, + expected: resource.Alias{Parent: "foo", NoParent: false}, + }, + { + name: `{Parent: "foo", NoParent: false, Name: "name"} (no transform)`, + input: resource.Alias{Parent: "foo", NoParent: false, Name: "name"}, + expected: resource.Alias{Parent: "foo", NoParent: false, Name: "name"}, + }, + } + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + actual := transformAliasForNodeJSCompat(tt.input) + assert.Equal(t, tt.expected, actual) + }) + } +} diff --git a/proto/.checksum.txt b/proto/.checksum.txt index 5ba49604e901..c4cb67a1cdd1 100644 --- a/proto/.checksum.txt +++ b/proto/.checksum.txt @@ -17,4 +17,4 @@ 2284604767 7368 proto/pulumi/language.proto 2700626499 1743 proto/pulumi/plugin.proto 164600211 22361 proto/pulumi/provider.proto -1325776472 11014 proto/pulumi/resource.proto +3734563396 11493 proto/pulumi/resource.proto diff --git a/proto/pulumi/resource.proto b/proto/pulumi/resource.proto index 17b9a17d2ab4..51479e6cdc7e 100644 --- a/proto/pulumi/resource.proto +++ b/proto/pulumi/resource.proto @@ -118,6 +118,15 @@ message RegisterResourceRequest { bool retainOnDelete = 25; // if true the engine will not call the resource providers delete method for this resource. repeated Alias aliases = 26; // a list of additional aliases that should be considered the same. string deletedWith = 27; // if set the engine will not call the resource providers delete method for this resource when specified resource is deleted. + + // Indicates that alias specs are specified correctly according to the spec. + // Older versions of the Node.js SDK did not send alias specs correctly. + // If this is not set to true and the engine detects the request is from the + // Node.js runtime, the engine will transform incorrect alias specs into + // correct ones. + // Other SDKs that are correctly specifying alias specs could set this to + // true, but it's not necessary. + bool aliasSpecs = 28; } // RegisterResourceResponse is returned by the engine after a resource has finished being initialized. It includes the diff --git a/sdk/nodejs/cmd/pulumi-language-nodejs/proxy.go b/sdk/nodejs/cmd/pulumi-language-nodejs/proxy.go index ffd313d47fb7..560f1d77c92c 100644 --- a/sdk/nodejs/cmd/pulumi-language-nodejs/proxy.go +++ b/sdk/nodejs/cmd/pulumi-language-nodejs/proxy.go @@ -23,6 +23,7 @@ import ( "google.golang.org/grpc/encoding" "google.golang.org/grpc/encoding/proto" + "google.golang.org/grpc/metadata" "github.com/pulumi/pulumi/sdk/v3/go/common/util/logging" pulumirpc "github.com/pulumi/pulumi/sdk/v3/proto/go" @@ -231,6 +232,11 @@ func (p *monitorProxy) ReadResource( func (p *monitorProxy) RegisterResource( ctx context.Context, req *pulumirpc.RegisterResourceRequest, ) (*pulumirpc.RegisterResourceResponse, error) { + // Add the "pulumi-runtime" header to the context so the engine can detect this request + // is coming from the nodejs language plugin. + // Setting this header is not required for other SDKs. We do it for nodejs so the engine + // can workaround a bug in older Node.js SDKs where alias specs weren't specified correctly. + ctx = metadata.AppendToOutgoingContext(ctx, "pulumi-runtime", "nodejs") return p.target.RegisterResource(ctx, req) } diff --git a/sdk/nodejs/proto/resource_pb.js b/sdk/nodejs/proto/resource_pb.js index e4b7e962f53c..e6f663e62279 100644 --- a/sdk/nodejs/proto/resource_pb.js +++ b/sdk/nodejs/proto/resource_pb.js @@ -1298,7 +1298,8 @@ proto.pulumirpc.RegisterResourceRequest.toObject = function(includeInstance, msg retainondelete: jspb.Message.getBooleanFieldWithDefault(msg, 25, false), aliasesList: jspb.Message.toObjectList(msg.getAliasesList(), pulumi_alias_pb.Alias.toObject, includeInstance), - deletedwith: jspb.Message.getFieldWithDefault(msg, 27, "") + deletedwith: jspb.Message.getFieldWithDefault(msg, 27, ""), + aliasspecs: jspb.Message.getBooleanFieldWithDefault(msg, 28, false) }; if (includeInstance) { @@ -1450,6 +1451,10 @@ proto.pulumirpc.RegisterResourceRequest.deserializeBinaryFromReader = function(m var value = /** @type {string} */ (reader.readString()); msg.setDeletedwith(value); break; + case 28: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAliasspecs(value); + break; default: reader.skipField(); break; @@ -1665,6 +1670,13 @@ proto.pulumirpc.RegisterResourceRequest.serializeBinaryToWriter = function(messa f ); } + f = message.getAliasspecs(); + if (f) { + writer.writeBool( + 28, + f + ); + } }; @@ -2661,6 +2673,24 @@ proto.pulumirpc.RegisterResourceRequest.prototype.setDeletedwith = function(valu }; +/** + * optional bool aliasSpecs = 28; + * @return {boolean} + */ +proto.pulumirpc.RegisterResourceRequest.prototype.getAliasspecs = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 28, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.pulumirpc.RegisterResourceRequest} returns this + */ +proto.pulumirpc.RegisterResourceRequest.prototype.setAliasspecs = function(value) { + return jspb.Message.setProto3BooleanField(this, 28, value); +}; + + /** * List of repeated fields within this message type. diff --git a/sdk/nodejs/runtime/resource.ts b/sdk/nodejs/runtime/resource.ts index f48c4ad847d5..0eab1c994791 100644 --- a/sdk/nodejs/runtime/resource.ts +++ b/sdk/nodejs/runtime/resource.ts @@ -433,6 +433,7 @@ export function registerResource( req.setPlugindownloadurl(opts.pluginDownloadURL || ""); req.setRetainondelete(opts.retainOnDelete || false); req.setDeletedwith(resop.deletedWithURN || ""); + req.setAliasspecs(true); if (resop.deletedWithURN && !(await monitorSupportsDeletedWith())) { throw new Error( diff --git a/sdk/proto/go/resource.pb.go b/sdk/proto/go/resource.pb.go index 9538526f55a7..1fa714e5e505 100644 --- a/sdk/proto/go/resource.pb.go +++ b/sdk/proto/go/resource.pb.go @@ -357,6 +357,14 @@ type RegisterResourceRequest struct { RetainOnDelete bool `protobuf:"varint,25,opt,name=retainOnDelete,proto3" json:"retainOnDelete,omitempty"` // if true the engine will not call the resource providers delete method for this resource. Aliases []*Alias `protobuf:"bytes,26,rep,name=aliases,proto3" json:"aliases,omitempty"` // a list of additional aliases that should be considered the same. DeletedWith string `protobuf:"bytes,27,opt,name=deletedWith,proto3" json:"deletedWith,omitempty"` // if set the engine will not call the resource providers delete method for this resource when specified resource is deleted. + // Indicates that alias specs are specified correctly according to the spec. + // Older versions of the Node.js SDK did not send alias specs correctly. + // If this is not set to true and the engine detects the request is from the + // Node.js runtime, the engine will transform incorrect alias specs into + // correct ones. + // Other SDKs that are correctly specifying alias specs could set this to + // true, but it's not necessary. + AliasSpecs bool `protobuf:"varint,28,opt,name=aliasSpecs,proto3" json:"aliasSpecs,omitempty"` } func (x *RegisterResourceRequest) Reset() { @@ -580,6 +588,13 @@ func (x *RegisterResourceRequest) GetDeletedWith() string { return "" } +func (x *RegisterResourceRequest) GetAliasSpecs() bool { + if x != nil { + return x.AliasSpecs + } + return false +} + // RegisterResourceResponse is returned by the engine after a resource has finished being initialized. It includes the // auto-assigned URN, the provider-assigned ID, and any other properties initialized by the engine. type RegisterResourceResponse struct { @@ -1024,7 +1039,7 @@ var file_pulumi_resource_proto_rawDesc = []byte{ 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x22, 0xf5, 0x0b, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x22, 0x95, 0x0c, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, @@ -1099,7 +1114,9 @@ var file_pulumi_resource_proto_rawDesc = []byte{ 0x70, 0x63, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x57, 0x69, 0x74, 0x68, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x57, - 0x69, 0x74, 0x68, 0x1a, 0x2a, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, + 0x69, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x53, 0x70, 0x65, 0x63, + 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x53, 0x70, + 0x65, 0x63, 0x73, 0x1a, 0x2a, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x72, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x72, 0x6e, 0x73, 0x1a, 0x58, 0x0a, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, diff --git a/sdk/python/lib/pulumi/runtime/proto/resource_pb2.py b/sdk/python/lib/pulumi/runtime/proto/resource_pb2.py index 5d58a4f9202f..7ddb77025a9c 100644 --- a/sdk/python/lib/pulumi/runtime/proto/resource_pb2.py +++ b/sdk/python/lib/pulumi/runtime/proto/resource_pb2.py @@ -17,7 +17,7 @@ from . import alias_pb2 as pulumi_dot_alias__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15pulumi/resource.proto\x12\tpulumirpc\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x15pulumi/provider.proto\x1a\x12pulumi/alias.proto\"$\n\x16SupportsFeatureRequest\x12\n\n\x02id\x18\x01 \x01(\t\"-\n\x17SupportsFeatureResponse\x12\x12\n\nhasSupport\x18\x01 \x01(\x08\"\xae\x02\n\x13ReadResourceRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12+\n\nproperties\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x14\n\x0c\x64\x65pendencies\x18\x06 \x03(\t\x12\x10\n\x08provider\x18\x07 \x01(\t\x12\x0f\n\x07version\x18\x08 \x01(\t\x12\x15\n\racceptSecrets\x18\t \x01(\x08\x12\x1f\n\x17\x61\x64\x64itionalSecretOutputs\x18\n \x03(\t\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x0c \x01(\x08\x12\x19\n\x11pluginDownloadURL\x18\r \x01(\tJ\x04\x08\x0b\x10\x0cR\x07\x61liases\"P\n\x14ReadResourceResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xc7\x08\n\x17RegisterResourceRequest\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x0e\n\x06\x63ustom\x18\x04 \x01(\x08\x12\'\n\x06object\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07protect\x18\x06 \x01(\x08\x12\x14\n\x0c\x64\x65pendencies\x18\x07 \x03(\t\x12\x10\n\x08provider\x18\x08 \x01(\t\x12Z\n\x14propertyDependencies\x18\t \x03(\x0b\x32<.pulumirpc.RegisterResourceRequest.PropertyDependenciesEntry\x12\x1b\n\x13\x64\x65leteBeforeReplace\x18\n \x01(\x08\x12\x0f\n\x07version\x18\x0b \x01(\t\x12\x15\n\rignoreChanges\x18\x0c \x03(\t\x12\x15\n\racceptSecrets\x18\r \x01(\x08\x12\x1f\n\x17\x61\x64\x64itionalSecretOutputs\x18\x0e \x03(\t\x12\x11\n\taliasURNs\x18\x0f \x03(\t\x12\x10\n\x08importId\x18\x10 \x01(\t\x12I\n\x0e\x63ustomTimeouts\x18\x11 \x01(\x0b\x32\x31.pulumirpc.RegisterResourceRequest.CustomTimeouts\x12\"\n\x1a\x64\x65leteBeforeReplaceDefined\x18\x12 \x01(\x08\x12\x1d\n\x15supportsPartialValues\x18\x13 \x01(\x08\x12\x0e\n\x06remote\x18\x14 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x15 \x01(\x08\x12\x44\n\tproviders\x18\x16 \x03(\x0b\x32\x31.pulumirpc.RegisterResourceRequest.ProvidersEntry\x12\x18\n\x10replaceOnChanges\x18\x17 \x03(\t\x12\x19\n\x11pluginDownloadURL\x18\x18 \x01(\t\x12\x16\n\x0eretainOnDelete\x18\x19 \x01(\x08\x12!\n\x07\x61liases\x18\x1a \x03(\x0b\x32\x10.pulumirpc.Alias\x12\x13\n\x0b\x64\x65letedWith\x18\x1b \x01(\t\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a@\n\x0e\x43ustomTimeouts\x12\x0e\n\x06\x63reate\x18\x01 \x01(\t\x12\x0e\n\x06update\x18\x02 \x01(\t\x12\x0e\n\x06\x64\x65lete\x18\x03 \x01(\t\x1at\n\x19PropertyDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.pulumirpc.RegisterResourceRequest.PropertyDependencies:\x02\x38\x01\x1a\x30\n\x0eProvidersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf7\x02\n\x18RegisterResourceResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\'\n\x06object\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0e\n\x06stable\x18\x04 \x01(\x08\x12\x0f\n\x07stables\x18\x05 \x03(\t\x12[\n\x14propertyDependencies\x18\x06 \x03(\x0b\x32=.pulumirpc.RegisterResourceResponse.PropertyDependenciesEntry\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1au\n\x19PropertyDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.pulumirpc.RegisterResourceResponse.PropertyDependencies:\x02\x38\x01\"W\n\x1eRegisterResourceOutputsRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12(\n\x07outputs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa2\x01\n\x15ResourceInvokeRequest\x12\x0b\n\x03tok\x18\x01 \x01(\t\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08provider\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x05 \x01(\x08\x12\x19\n\x11pluginDownloadURL\x18\x06 \x01(\t2\xd4\x04\n\x0fResourceMonitor\x12Z\n\x0fSupportsFeature\x12!.pulumirpc.SupportsFeatureRequest\x1a\".pulumirpc.SupportsFeatureResponse\"\x00\x12G\n\x06Invoke\x12 .pulumirpc.ResourceInvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x12O\n\x0cStreamInvoke\x12 .pulumirpc.ResourceInvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x30\x01\x12\x39\n\x04\x43\x61ll\x12\x16.pulumirpc.CallRequest\x1a\x17.pulumirpc.CallResponse\"\x00\x12Q\n\x0cReadResource\x12\x1e.pulumirpc.ReadResourceRequest\x1a\x1f.pulumirpc.ReadResourceResponse\"\x00\x12]\n\x10RegisterResource\x12\".pulumirpc.RegisterResourceRequest\x1a#.pulumirpc.RegisterResourceResponse\"\x00\x12^\n\x17RegisterResourceOutputs\x12).pulumirpc.RegisterResourceOutputsRequest\x1a\x16.google.protobuf.Empty\"\x00\x42\x34Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15pulumi/resource.proto\x12\tpulumirpc\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x15pulumi/provider.proto\x1a\x12pulumi/alias.proto\"$\n\x16SupportsFeatureRequest\x12\n\n\x02id\x18\x01 \x01(\t\"-\n\x17SupportsFeatureResponse\x12\x12\n\nhasSupport\x18\x01 \x01(\x08\"\xae\x02\n\x13ReadResourceRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12+\n\nproperties\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x14\n\x0c\x64\x65pendencies\x18\x06 \x03(\t\x12\x10\n\x08provider\x18\x07 \x01(\t\x12\x0f\n\x07version\x18\x08 \x01(\t\x12\x15\n\racceptSecrets\x18\t \x01(\x08\x12\x1f\n\x17\x61\x64\x64itionalSecretOutputs\x18\n \x03(\t\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x0c \x01(\x08\x12\x19\n\x11pluginDownloadURL\x18\r \x01(\tJ\x04\x08\x0b\x10\x0cR\x07\x61liases\"P\n\x14ReadResourceResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xdb\x08\n\x17RegisterResourceRequest\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x0e\n\x06\x63ustom\x18\x04 \x01(\x08\x12\'\n\x06object\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07protect\x18\x06 \x01(\x08\x12\x14\n\x0c\x64\x65pendencies\x18\x07 \x03(\t\x12\x10\n\x08provider\x18\x08 \x01(\t\x12Z\n\x14propertyDependencies\x18\t \x03(\x0b\x32<.pulumirpc.RegisterResourceRequest.PropertyDependenciesEntry\x12\x1b\n\x13\x64\x65leteBeforeReplace\x18\n \x01(\x08\x12\x0f\n\x07version\x18\x0b \x01(\t\x12\x15\n\rignoreChanges\x18\x0c \x03(\t\x12\x15\n\racceptSecrets\x18\r \x01(\x08\x12\x1f\n\x17\x61\x64\x64itionalSecretOutputs\x18\x0e \x03(\t\x12\x11\n\taliasURNs\x18\x0f \x03(\t\x12\x10\n\x08importId\x18\x10 \x01(\t\x12I\n\x0e\x63ustomTimeouts\x18\x11 \x01(\x0b\x32\x31.pulumirpc.RegisterResourceRequest.CustomTimeouts\x12\"\n\x1a\x64\x65leteBeforeReplaceDefined\x18\x12 \x01(\x08\x12\x1d\n\x15supportsPartialValues\x18\x13 \x01(\x08\x12\x0e\n\x06remote\x18\x14 \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x15 \x01(\x08\x12\x44\n\tproviders\x18\x16 \x03(\x0b\x32\x31.pulumirpc.RegisterResourceRequest.ProvidersEntry\x12\x18\n\x10replaceOnChanges\x18\x17 \x03(\t\x12\x19\n\x11pluginDownloadURL\x18\x18 \x01(\t\x12\x16\n\x0eretainOnDelete\x18\x19 \x01(\x08\x12!\n\x07\x61liases\x18\x1a \x03(\x0b\x32\x10.pulumirpc.Alias\x12\x13\n\x0b\x64\x65letedWith\x18\x1b \x01(\t\x12\x12\n\naliasSpecs\x18\x1c \x01(\x08\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1a@\n\x0e\x43ustomTimeouts\x12\x0e\n\x06\x63reate\x18\x01 \x01(\t\x12\x0e\n\x06update\x18\x02 \x01(\t\x12\x0e\n\x06\x64\x65lete\x18\x03 \x01(\t\x1at\n\x19PropertyDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.pulumirpc.RegisterResourceRequest.PropertyDependencies:\x02\x38\x01\x1a\x30\n\x0eProvidersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf7\x02\n\x18RegisterResourceResponse\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\'\n\x06object\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0e\n\x06stable\x18\x04 \x01(\x08\x12\x0f\n\x07stables\x18\x05 \x03(\t\x12[\n\x14propertyDependencies\x18\x06 \x03(\x0b\x32=.pulumirpc.RegisterResourceResponse.PropertyDependenciesEntry\x1a$\n\x14PropertyDependencies\x12\x0c\n\x04urns\x18\x01 \x03(\t\x1au\n\x19PropertyDependenciesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.pulumirpc.RegisterResourceResponse.PropertyDependencies:\x02\x38\x01\"W\n\x1eRegisterResourceOutputsRequest\x12\x0b\n\x03urn\x18\x01 \x01(\t\x12(\n\x07outputs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa2\x01\n\x15ResourceInvokeRequest\x12\x0b\n\x03tok\x18\x01 \x01(\t\x12%\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08provider\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\x12\x17\n\x0f\x61\x63\x63\x65ptResources\x18\x05 \x01(\x08\x12\x19\n\x11pluginDownloadURL\x18\x06 \x01(\t2\xd4\x04\n\x0fResourceMonitor\x12Z\n\x0fSupportsFeature\x12!.pulumirpc.SupportsFeatureRequest\x1a\".pulumirpc.SupportsFeatureResponse\"\x00\x12G\n\x06Invoke\x12 .pulumirpc.ResourceInvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x12O\n\x0cStreamInvoke\x12 .pulumirpc.ResourceInvokeRequest\x1a\x19.pulumirpc.InvokeResponse\"\x00\x30\x01\x12\x39\n\x04\x43\x61ll\x12\x16.pulumirpc.CallRequest\x1a\x17.pulumirpc.CallResponse\"\x00\x12Q\n\x0cReadResource\x12\x1e.pulumirpc.ReadResourceRequest\x1a\x1f.pulumirpc.ReadResourceResponse\"\x00\x12]\n\x10RegisterResource\x12\".pulumirpc.RegisterResourceRequest\x1a#.pulumirpc.RegisterResourceResponse\"\x00\x12^\n\x17RegisterResourceOutputs\x12).pulumirpc.RegisterResourceOutputsRequest\x1a\x16.google.protobuf.Empty\"\x00\x42\x34Z2github.com/pulumi/pulumi/sdk/v3/proto/go;pulumirpcb\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pulumi.resource_pb2', globals()) @@ -40,25 +40,25 @@ _READRESOURCERESPONSE._serialized_start=528 _READRESOURCERESPONSE._serialized_end=608 _REGISTERRESOURCEREQUEST._serialized_start=611 - _REGISTERRESOURCEREQUEST._serialized_end=1706 - _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIES._serialized_start=1436 - _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIES._serialized_end=1472 - _REGISTERRESOURCEREQUEST_CUSTOMTIMEOUTS._serialized_start=1474 - _REGISTERRESOURCEREQUEST_CUSTOMTIMEOUTS._serialized_end=1538 - _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY._serialized_start=1540 - _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY._serialized_end=1656 - _REGISTERRESOURCEREQUEST_PROVIDERSENTRY._serialized_start=1658 - _REGISTERRESOURCEREQUEST_PROVIDERSENTRY._serialized_end=1706 - _REGISTERRESOURCERESPONSE._serialized_start=1709 - _REGISTERRESOURCERESPONSE._serialized_end=2084 - _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIES._serialized_start=1436 - _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIES._serialized_end=1472 - _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIESENTRY._serialized_start=1967 - _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIESENTRY._serialized_end=2084 - _REGISTERRESOURCEOUTPUTSREQUEST._serialized_start=2086 - _REGISTERRESOURCEOUTPUTSREQUEST._serialized_end=2173 - _RESOURCEINVOKEREQUEST._serialized_start=2176 - _RESOURCEINVOKEREQUEST._serialized_end=2338 - _RESOURCEMONITOR._serialized_start=2341 - _RESOURCEMONITOR._serialized_end=2937 + _REGISTERRESOURCEREQUEST._serialized_end=1726 + _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIES._serialized_start=1456 + _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIES._serialized_end=1492 + _REGISTERRESOURCEREQUEST_CUSTOMTIMEOUTS._serialized_start=1494 + _REGISTERRESOURCEREQUEST_CUSTOMTIMEOUTS._serialized_end=1558 + _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY._serialized_start=1560 + _REGISTERRESOURCEREQUEST_PROPERTYDEPENDENCIESENTRY._serialized_end=1676 + _REGISTERRESOURCEREQUEST_PROVIDERSENTRY._serialized_start=1678 + _REGISTERRESOURCEREQUEST_PROVIDERSENTRY._serialized_end=1726 + _REGISTERRESOURCERESPONSE._serialized_start=1729 + _REGISTERRESOURCERESPONSE._serialized_end=2104 + _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIES._serialized_start=1456 + _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIES._serialized_end=1492 + _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIESENTRY._serialized_start=1987 + _REGISTERRESOURCERESPONSE_PROPERTYDEPENDENCIESENTRY._serialized_end=2104 + _REGISTERRESOURCEOUTPUTSREQUEST._serialized_start=2106 + _REGISTERRESOURCEOUTPUTSREQUEST._serialized_end=2193 + _RESOURCEINVOKEREQUEST._serialized_start=2196 + _RESOURCEINVOKEREQUEST._serialized_end=2358 + _RESOURCEMONITOR._serialized_start=2361 + _RESOURCEMONITOR._serialized_end=2957 # @@protoc_insertion_point(module_scope) diff --git a/sdk/python/lib/pulumi/runtime/proto/resource_pb2.pyi b/sdk/python/lib/pulumi/runtime/proto/resource_pb2.pyi index a2636e2f41a2..b2a920dbbbce 100644 --- a/sdk/python/lib/pulumi/runtime/proto/resource_pb2.pyi +++ b/sdk/python/lib/pulumi/runtime/proto/resource_pb2.pyi @@ -272,6 +272,7 @@ class RegisterResourceRequest(google.protobuf.message.Message): RETAINONDELETE_FIELD_NUMBER: builtins.int ALIASES_FIELD_NUMBER: builtins.int DELETEDWITH_FIELD_NUMBER: builtins.int + ALIASSPECS_FIELD_NUMBER: builtins.int type: builtins.str """the type of the object allocated.""" name: builtins.str @@ -336,6 +337,15 @@ class RegisterResourceRequest(google.protobuf.message.Message): """a list of additional aliases that should be considered the same.""" deletedWith: builtins.str """if set the engine will not call the resource providers delete method for this resource when specified resource is deleted.""" + aliasSpecs: builtins.bool + """Indicates that alias specs are specified correctly according to the spec. + Older versions of the Node.js SDK did not send alias specs correctly. + If this is not set to true and the engine detects the request is from the + Node.js runtime, the engine will transform incorrect alias specs into + correct ones. + Other SDKs that are correctly specifying alias specs could set this to + true, but it's not necessary. + """ def __init__( self, *, @@ -366,9 +376,10 @@ class RegisterResourceRequest(google.protobuf.message.Message): retainOnDelete: builtins.bool = ..., aliases: collections.abc.Iterable[pulumi.alias_pb2.Alias] | None = ..., deletedWith: builtins.str = ..., + aliasSpecs: builtins.bool = ..., ) -> None: ... def HasField(self, field_name: typing_extensions.Literal["customTimeouts", b"customTimeouts", "object", b"object"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["acceptResources", b"acceptResources", "acceptSecrets", b"acceptSecrets", "additionalSecretOutputs", b"additionalSecretOutputs", "aliasURNs", b"aliasURNs", "aliases", b"aliases", "custom", b"custom", "customTimeouts", b"customTimeouts", "deleteBeforeReplace", b"deleteBeforeReplace", "deleteBeforeReplaceDefined", b"deleteBeforeReplaceDefined", "deletedWith", b"deletedWith", "dependencies", b"dependencies", "ignoreChanges", b"ignoreChanges", "importId", b"importId", "name", b"name", "object", b"object", "parent", b"parent", "pluginDownloadURL", b"pluginDownloadURL", "propertyDependencies", b"propertyDependencies", "protect", b"protect", "provider", b"provider", "providers", b"providers", "remote", b"remote", "replaceOnChanges", b"replaceOnChanges", "retainOnDelete", b"retainOnDelete", "supportsPartialValues", b"supportsPartialValues", "type", b"type", "version", b"version"]) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["acceptResources", b"acceptResources", "acceptSecrets", b"acceptSecrets", "additionalSecretOutputs", b"additionalSecretOutputs", "aliasSpecs", b"aliasSpecs", "aliasURNs", b"aliasURNs", "aliases", b"aliases", "custom", b"custom", "customTimeouts", b"customTimeouts", "deleteBeforeReplace", b"deleteBeforeReplace", "deleteBeforeReplaceDefined", b"deleteBeforeReplaceDefined", "deletedWith", b"deletedWith", "dependencies", b"dependencies", "ignoreChanges", b"ignoreChanges", "importId", b"importId", "name", b"name", "object", b"object", "parent", b"parent", "pluginDownloadURL", b"pluginDownloadURL", "propertyDependencies", b"propertyDependencies", "protect", b"protect", "provider", b"provider", "providers", b"providers", "remote", b"remote", "replaceOnChanges", b"replaceOnChanges", "retainOnDelete", b"retainOnDelete", "supportsPartialValues", b"supportsPartialValues", "type", b"type", "version", b"version"]) -> None: ... global___RegisterResourceRequest = RegisterResourceRequest