Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin dependencies #3388

Merged
merged 2 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ require (
github.com/pkg/errors v0.9.1
github.com/pulumi/cloud-ready-checks v1.2.0
github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.19.0
github.com/pulumi/pulumi/pkg/v3 v3.143.0
github.com/pulumi/pulumi/sdk/v3 v3.143.0
github.com/pulumi/pulumi/pkg/v3 v3.144.1
github.com/pulumi/pulumi/sdk/v3 v3.144.1
github.com/stretchr/testify v1.10.0
golang.org/x/crypto v0.31.0
golang.org/x/exp v0.0.0-20241210194714-1829a127f884
Expand Down
4 changes: 4 additions & 0 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,12 @@ github.com/pulumi/inflector v0.1.1 h1:dvlxlWtXwOJTUUtcYDvwnl6Mpg33prhK+7mzeF+Sob
github.com/pulumi/inflector v0.1.1/go.mod h1:HUFCjcPTz96YtTuUlwG3i3EZG4WlniBvR9bd+iJxCUY=
github.com/pulumi/pulumi/pkg/v3 v3.143.0 h1:diAlaNVZSRc59ePqbMuvuf/AwecpZyjhh1pGvmLEUwg=
github.com/pulumi/pulumi/pkg/v3 v3.143.0/go.mod h1:XzjN1uQI2HWXYolT2L4RIXzvLEnWTSOzFgFFIUfFEa8=
github.com/pulumi/pulumi/pkg/v3 v3.144.1 h1:64mVLQDEZa2GN52rTKSyXlA3r+APoqDXrNdkzlASyvs=
github.com/pulumi/pulumi/pkg/v3 v3.144.1/go.mod h1:q2wZOcwXVI/+OBtEXD6mLS7shhRMgsIGTo/uWfo0q04=
github.com/pulumi/pulumi/sdk/v3 v3.143.0 h1:z1m8Fc6l723eU2J/bP7UHE5t6WbBu4iIDAl1WaalQk4=
github.com/pulumi/pulumi/sdk/v3 v3.143.0/go.mod h1:OFpZabILGxrFqzcABFpMCksrHGVp4ymRM2BkKjlazDY=
github.com/pulumi/pulumi/sdk/v3 v3.144.1 h1:QQtCDERihhlfvcmRzqHeBmOER1Fg1VkFj9933Lxqv00=
github.com/pulumi/pulumi/sdk/v3 v3.144.1/go.mod h1:/6gxU2XirnLlImBy5OoqV6I4HcjOf+IznNIZNZExZzo=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
Expand Down
6 changes: 3 additions & 3 deletions tests/ci-cluster/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"@types/node": "latest"
},
"dependencies": {
"@pulumi/gcp": "^5.4.0",
"@pulumi/kubernetes": "^3.2.0",
"@pulumi/pulumi": "^3.2.1"
"@pulumi/gcp": "5.26.0",
"@pulumi/kubernetes": "3.30.2",
"@pulumi/pulumi": "3.144.1"
}
}
6 changes: 3 additions & 3 deletions tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ replace (
require (
github.com/onsi/gomega v1.35.1
github.com/pkg/errors v0.9.1
github.com/pulumi/providertest v0.0.12
github.com/pulumi/providertest v0.1.3
github.com/pulumi/pulumi-kubernetes/provider/v4 v4.0.0
github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.19.0
github.com/pulumi/pulumi/pkg/v3 v3.143.0
github.com/pulumi/pulumi/sdk/v3 v3.143.0
github.com/pulumi/pulumi/pkg/v3 v3.144.1
github.com/pulumi/pulumi/sdk/v3 v3.144.1
github.com/pulumiverse/pulumi-time/sdk v0.0.0-20231010123146-089d7304da13
github.com/stretchr/testify v1.10.0
golang.org/x/exp v0.0.0-20241210194714-1829a127f884
Expand Down
6 changes: 6 additions & 0 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,16 @@ github.com/pulumi/esc v0.10.0 h1:jzBKzkLVW0mePeanDRfqSQoCJ5yrkux0jIwAkUxpRKE=
github.com/pulumi/esc v0.10.0/go.mod h1:2Bfa+FWj/xl8CKqRTWbWgDX0SOD4opdQgvYSURTGK2c=
github.com/pulumi/providertest v0.0.12 h1:UjcFQHHs4AGJyJqxhvC2q8yVQ7Li+UyCyP95HZcK03U=
github.com/pulumi/providertest v0.0.12/go.mod h1:REAoaN+hGOtdWJGirfWYqcSjCejlbGfzyVTUuemJTuE=
github.com/pulumi/providertest v0.1.3 h1:GpNKRy/haNjRHiUA9bi4diU4Op2zf3axYXbga5AepHg=
github.com/pulumi/providertest v0.1.3/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0=
github.com/pulumi/pulumi/pkg/v3 v3.143.0 h1:diAlaNVZSRc59ePqbMuvuf/AwecpZyjhh1pGvmLEUwg=
github.com/pulumi/pulumi/pkg/v3 v3.143.0/go.mod h1:XzjN1uQI2HWXYolT2L4RIXzvLEnWTSOzFgFFIUfFEa8=
github.com/pulumi/pulumi/pkg/v3 v3.144.1 h1:64mVLQDEZa2GN52rTKSyXlA3r+APoqDXrNdkzlASyvs=
github.com/pulumi/pulumi/pkg/v3 v3.144.1/go.mod h1:q2wZOcwXVI/+OBtEXD6mLS7shhRMgsIGTo/uWfo0q04=
github.com/pulumi/pulumi/sdk/v3 v3.143.0 h1:z1m8Fc6l723eU2J/bP7UHE5t6WbBu4iIDAl1WaalQk4=
github.com/pulumi/pulumi/sdk/v3 v3.143.0/go.mod h1:OFpZabILGxrFqzcABFpMCksrHGVp4ymRM2BkKjlazDY=
github.com/pulumi/pulumi/sdk/v3 v3.144.1 h1:QQtCDERihhlfvcmRzqHeBmOER1Fg1VkFj9933Lxqv00=
github.com/pulumi/pulumi/sdk/v3 v3.144.1/go.mod h1:/6gxU2XirnLlImBy5OoqV6I4HcjOf+IznNIZNZExZzo=
github.com/pulumiverse/pulumi-time/sdk v0.0.0-20231010123146-089d7304da13 h1:4U7DFIlSggj/4iLbis2Bckayed+OhaYKE7bncZwQCYI=
github.com/pulumiverse/pulumi-time/sdk v0.0.0-20231010123146-089d7304da13/go.mod h1:NUa1zA74DF002WrM6iF111A6UjX9knPpXufVRvBwNyg=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
Expand Down
54 changes: 27 additions & 27 deletions tests/sdk/java/await_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ func TestAwaitDaemonSet(t *testing.T) {
opttest.SkipInstall(),
)
t.Cleanup(func() {
test.Destroy()
test.Destroy(t)
})

// Create a new DS that takes a few seconds to become ready.
up := test.Up()
up := test.Up(t)
t.Log(up.Summary.Message)
assertReady(t, up.Outputs)

test.Refresh() // Exercise read-await logic.
test.Refresh(t) // Exercise read-await logic.

// Update the DS to use a different but valid image tag.
test.UpdateSource("testdata/await/daemonset/step2")
up = test.Up()
test.UpdateSource(t, "testdata/await/daemonset/step2")
up = test.Up(t)
assertReady(t, up.Outputs)

// Update the DS to use an invalid image tag. It should never become ready.
test.UpdateSource("testdata/await/daemonset/step3")
test.UpdateSource(t, "testdata/await/daemonset/step3")
_, err := test.CurrentStack().Up(context.Background())
assert.ErrorContains(t, err, `the Kubernetes API server reported that "default/await-daemonset" failed to fully initialize or become live: timed out waiting for the condition`)
}
Expand All @@ -87,16 +87,16 @@ func TestAwaitPVC(t *testing.T) {
opttest.SkipInstall(),
)
t.Cleanup(func() {
test.Destroy()
test.Destroy(t)
})

// WaitUntilFirstConsumer PVC should still be Pending.
up := test.Up()
up := test.Up(t)
assert.Equal(t, "Pending", up.Outputs["status"].Value)

// Adding a Deployment to consume the PVC should succeed.
test.UpdateSource("testdata/await/pvc/step2")
up = test.Up()
test.UpdateSource(t, "testdata/await/pvc/step2")
up = test.Up(t)
}

func TestAwaitService(t *testing.T) {
Expand All @@ -107,19 +107,19 @@ func TestAwaitService(t *testing.T) {
opttest.SkipInstall(),
)
t.Cleanup(func() {
test.Destroy()
test.Destroy(t)
})

up := test.Up()
up := test.Up(t)
assert.Equal(t, float64(1), up.Outputs["replicas"].Value.(float64))
assert.Nil(t, up.Outputs["selector"].Value)
test.Refresh()
test.Refresh(t)

test.UpdateSource("testdata/await/service/step2")
up = test.Up()
test.UpdateSource(t, "testdata/await/service/step2")
up = test.Up(t)
assert.Equal(t, float64(0), up.Outputs["replicas"].Value.(float64))
assert.Equal(t, up.Outputs["selector"], up.Outputs["label"])
test.Refresh()
test.Refresh(t)
}

func TestAwaitServiceAccount(t *testing.T) {
Expand All @@ -130,13 +130,13 @@ func TestAwaitServiceAccount(t *testing.T) {
opttest.SkipInstall(),
)
t.Cleanup(func() {
test.Destroy()
test.Destroy(t)
})

test.Up()
test.UpdateSource("testdata/await/service-account/step2")
test.Up()
test.Refresh()
test.Up(t)
test.UpdateSource(t, "testdata/await/service-account/step2")
test.Up(t)
test.Refresh(t)
}

func TestAwaitSkip(t *testing.T) {
Expand All @@ -147,27 +147,27 @@ func TestAwaitSkip(t *testing.T) {
opttest.SkipInstall(),
)
t.Cleanup(func() {
test.Destroy()
test.Destroy(t)
})

start := time.Now()
_ = test.Up(optup.ProgressStreams(os.Stdout))
_ = test.Up(t, optup.ProgressStreams(os.Stdout))
took := time.Since(start)
assert.Less(t, took, 2*time.Minute, "didn't skip pod's slow startup")

start = time.Now()
_ = test.Refresh(optrefresh.ProgressStreams(os.Stdout))
_ = test.Refresh(t, optrefresh.ProgressStreams(os.Stdout))
took = time.Since(start)
assert.Less(t, took, 2*time.Minute, "didn't skip pod's slow read")

test.UpdateSource("testdata/await/skipawait/step2")
test.UpdateSource(t, "testdata/await/skipawait/step2")
start = time.Now()
_ = test.Refresh(optrefresh.ProgressStreams(os.Stdout))
_ = test.Refresh(t, optrefresh.ProgressStreams(os.Stdout))
took = time.Since(start)
assert.Less(t, took, 2*time.Minute, "didn't skip pod's slow update")

start = time.Now()
_ = test.Destroy(optdestroy.ProgressStreams(os.Stdout))
_ = test.Destroy(t, optdestroy.ProgressStreams(os.Stdout))
took = time.Since(start)
assert.Less(t, took, 2*time.Minute, "didn't skip config map's stuck delete")
}
8 changes: 4 additions & 4 deletions tests/sdk/java/chartv4_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ func TestChartv4(t *testing.T) {
test := pulumitest.NewPulumiTest(t, "testdata/chartv4", opttest.SkipInstall())
t.Logf("into %s", test.Source())
t.Cleanup(func() {
test.Destroy()
test.Destroy(t)
})
test.Preview()
test.Up()
test.Up(optup.ExpectNoChanges())
test.Preview(t)
test.Up(t)
test.Up(t, optup.ExpectNoChanges())
}
8 changes: 4 additions & 4 deletions tests/sdk/java/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ func TestClusterIdentifier(t *testing.T) {
ctx := context.Background()
test := pulumitest.NewPulumiTest(t, "config/cluster-identifier")
t.Cleanup(func() {
test.Destroy()
test.Destroy(t)
})

test.Up()
test.Up(t)

test.UpdateSource("config/cluster-identifier/step2")
test.UpdateSource(t, "config/cluster-identifier/step2")
up, err := test.CurrentStack().Up(ctx)

require.NoError(t, err)
assert.Contains(t, up.StdOut, "updated")
assert.NotContains(t, up.StdOut, "replaced")

test.UpdateSource("config/cluster-identifier/step3")
test.UpdateSource(t, "config/cluster-identifier/step3")
up, err = test.CurrentStack().Up(ctx)

require.NoError(t, err)
Expand Down
12 changes: 6 additions & 6 deletions tests/sdk/java/configmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ func TestConfigMapAndSecretImmutability(t *testing.T) {
opttest.SkipInstall(),
)
t.Cleanup(func() {
test.Destroy()
test.Destroy(t)
})

// Create the secrets/configmaps.
up := test.Up()
up := test.Up(t)

// We will detect update/replacement behavior by observing effects on our
// downstream dependencies.
Expand All @@ -32,8 +32,8 @@ func TestConfigMapAndSecretImmutability(t *testing.T) {
mutableConfigmap := up.Outputs["mutableConfigmap"].Value.(string)

// Update the data of all our secrets and configmaps.
test.UpdateSource("testdata/immutability/step2")
up = test.Up()
test.UpdateSource(t, "testdata/immutability/step2")
up = test.Up(t)

// Only the mutable configmap and secret should have been updated -- so no
// impact on those two downstreams.
Expand All @@ -53,8 +53,8 @@ func TestConfigMapAndSecretImmutability(t *testing.T) {

// The final step only touches annotations. All resources should have been
// updated.
test.UpdateSource("testdata/immutability/step3")
up = test.Up()
test.UpdateSource(t, "testdata/immutability/step3")
up = test.Up(t)
assert.Equal(t, secret, up.Outputs["secret"].Value.(string))
assert.Equal(t, configmap, up.Outputs["configmap"].Value.(string))
assert.Equal(t, autonamedSecret, up.Outputs["autonamedSecret"].Value.(string))
Expand Down
22 changes: 11 additions & 11 deletions tests/sdk/java/crd_java_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ func TestJavaCanCreateCRD(t *testing.T) {
test := pulumitest.NewPulumiTest(t, "testdata/crd-java/step1")
t.Logf("into %s", test.Source())
t.Cleanup(func() {
test.Destroy()
test.Destroy(t)
})
test.Preview()
test.Up()
test.Preview(t)
test.Up(t)

// Step 2 adds a pulumi CRD get operation and ensures we can read its URN properly.
test.UpdateSource("testdata/crd-java/step2")
test.Preview()
test.Up()
up := test.Up(optup.ExpectNoChanges())
test.UpdateSource(t, "testdata/crd-java/step2")
test.Preview(t)
test.Up(t)
up := test.Up(t, optup.ExpectNoChanges())

urn, ok := up.Outputs["urn"]
require.True(t, ok)
Expand All @@ -53,10 +53,10 @@ func TestJavaCanCreateCRD(t *testing.T) {
assert.Contains(t, string(output), `"x-kubernetes-preserve-unknown-fields": true`)

// Step 3 removes the `x-kubernetes-preserve-unknown-fields` field and ensures that the CRD is updated.
test.UpdateSource("testdata/crd-java/step3")
test.Preview()
test.Up()
up = test.Up(optup.ExpectNoChanges())
test.UpdateSource(t, "testdata/crd-java/step3")
test.Preview(t)
test.Up(t)
up = test.Up(t, optup.ExpectNoChanges())

// Verify with kubectl that the CRD no longer has `x-kubernetes-*` fields set.
output, err = tests.Kubectl("get crd javacrds.example.com -o json")
Expand Down
14 changes: 7 additions & 7 deletions tests/sdk/java/csa_to_ssa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ func TestCSAToSSANoManagedFields(t *testing.T) {
test := pulumitest.NewPulumiTest(t, "testdata/csa-to-ssa", opttest.SkipInstall())
t.Logf("into %s", test.Source())
t.Cleanup(func() {
test.Destroy()
test.Destroy(t)
})
test.Preview()
test.Up()
test.Preview(t)
test.Up(t)

outputs, err := test.CurrentStack().Outputs(ctx)
require.NoError(t, err, "Failed to get outputs from stack")
Expand Down Expand Up @@ -85,8 +85,8 @@ func TestCSAToSSANoManagedFields(t *testing.T) {
require.Empty(t, dep.GetManagedFields(), "Failed to remove managedFields from deployment object")

// 3. Apply step 2 of testdata where SSA mode is enabled, with a change in the image spec field.
test.UpdateSource("testdata/csa-to-ssa/step2")
test.Preview()
test.Up()
test.Up(optup.ExpectNoChanges())
test.UpdateSource(t, "testdata/csa-to-ssa/step2")
test.Preview(t)
test.Up(t)
test.Up(t, optup.ExpectNoChanges())
}
6 changes: 3 additions & 3 deletions tests/sdk/java/kustomizev2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ func TestKustomizeV2(t *testing.T) {
)
t.Logf("into %s", test.Source())
t.Cleanup(func() {
test.Destroy()
test.Destroy(t)
})
test.Preview()
test.Up()
test.Preview(t)
test.Up(t)
}
Loading
Loading