From b1d4483ac415840b907db76b39d0b041cbf10e66 Mon Sep 17 00:00:00 2001 From: Pulumi Bot Date: Wed, 15 May 2024 06:07:59 +0000 Subject: [PATCH] [internal] Update GitHub Actions workflow files --- .github/workflows/main.yml | 7 +++ .github/workflows/prerelease.yml | 43 +++++++++++++++++++ .github/workflows/release.yml | 32 ++++++++++++-- .github/workflows/run-acceptance-tests.yml | 7 +++ .../schema.json | 10 +++-- provider/resources.go | 22 +++++++--- sdk/dotnet/Pulumi.ConfluentCloud.csproj | 1 + sdk/dotnet/pulumi-plugin.json | 3 +- .../internal/pulumiUtilities.go | 4 +- sdk/go/confluentcloud/pulumi-plugin.json | 3 +- sdk/nodejs/package.json | 5 ++- .../pulumi_confluentcloud/pulumi-plugin.json | 3 +- sdk/python/pyproject.toml | 2 +- 13 files changed, 122 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4141f997..7a0cc1df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -104,6 +104,13 @@ jobs: run: make build_${{ matrix.language }} - name: Check worktree clean uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: | + sdk/**/pulumi-plugin.json + sdk/dotnet/Pulumi.*.csproj + sdk/go/*/internal/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml - name: Compress SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 561a6082..31e428fc 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -105,6 +105,13 @@ jobs: run: make build_${{ matrix.language }} - name: Check worktree clean uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: | + sdk/**/pulumi-plugin.json + sdk/dotnet/Pulumi.*.csproj + sdk/go/*/internal/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml - name: Compress SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts @@ -304,6 +311,42 @@ jobs: if: failure() name: Send Publish Failure To Slack uses: rtCamp/action-slack-notify@v2 + publish_go_sdk: + name: publish_go_sdk + needs: publish_sdk + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - name: Install pulumictl + uses: jaxxstorm/action-install-gh-release@v1.11.0 + with: + tag: v0.0.46 + repo: pulumi/pulumictl + - id: version + uses: pulumi/provider-version-action@v1 + - name: Download Go SDK + uses: actions/download-artifact@v4 + with: + name: go-sdk.tar.gz + path: ${{ github.workspace }}/sdk/ + - name: Uncompress Go SDK + run: tar -zxf ${{ github.workspace }}/sdk/go.tar.gz -C + ${{ github.workspace }}/sdk/go + shell: bash + - uses: pulumi/publish-go-sdk-action@v1 + with: + repository: ${{ github.repository }} + base-ref: ${{ github.sha }} + source: sdk + path: sdk + version: ${{ steps.version.outputs.version }} + additive: false + # Avoid including other language SDKs & artifacts in the commit + files: | + go.* + go/** + !*.tar.gz test: name: test needs: build_sdk diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe458a79..8c0d070c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,6 +104,13 @@ jobs: run: make build_${{ matrix.language }} - name: Check worktree clean uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: | + sdk/**/pulumi-plugin.json + sdk/dotnet/Pulumi.*.csproj + sdk/go/*/internal/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml - name: Compress SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts @@ -331,9 +338,28 @@ jobs: repo: pulumi/pulumictl - id: version uses: pulumi/provider-version-action@v1 - - name: Add SDK version tag - run: git tag "sdk/v${{ steps.version.outputs.version }}" && git push origin - "sdk/v${{ steps.version.outputs.version }}" + - name: Download Go SDK + uses: actions/download-artifact@v4 + with: + name: go-sdk.tar.gz + path: ${{ github.workspace }}/sdk/ + - name: Uncompress Go SDK + run: tar -zxf ${{ github.workspace }}/sdk/go.tar.gz -C + ${{ github.workspace }}/sdk/go + shell: bash + - uses: pulumi/publish-go-sdk-action@v1 + with: + repository: ${{ github.repository }} + base-ref: ${{ github.sha }} + source: sdk + path: sdk + version: ${{ steps.version.outputs.version }} + additive: false + # Avoid including other language SDKs & artifacts in the commit + files: | + go.* + go/** + !*.tar.gz clean_up_release_labels: name: Clean up release labels diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index fe40337d..06d93760 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -114,6 +114,13 @@ jobs: run: make build_${{ matrix.language }} - name: Check worktree clean uses: pulumi/git-status-check-action@v1 + with: + allowed-changes: | + sdk/**/pulumi-plugin.json + sdk/dotnet/Pulumi.*.csproj + sdk/go/*/internal/pulumiUtilities.go + sdk/nodejs/package.json + sdk/python/pyproject.toml - name: Compress SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts diff --git a/provider/cmd/pulumi-resource-confluentcloud/schema.json b/provider/cmd/pulumi-resource-confluentcloud/schema.json index ca4e3dc9..f1944e81 100644 --- a/provider/cmd/pulumi-resource-confluentcloud/schema.json +++ b/provider/cmd/pulumi-resource-confluentcloud/schema.json @@ -23,12 +23,14 @@ "namespaces": { "confluentcloud": "ConfluentCloud" }, - "compatibility": "tfbridge20" + "compatibility": "tfbridge20", + "respectSchemaVersion": true }, "go": { "importBasePath": "github.com/pulumi/pulumi-confluentcloud/sdk/go/confluentcloud", "generateResourceContainerTypes": true, - "generateExtraInputTypes": true + "generateExtraInputTypes": true, + "respectSchemaVersion": true }, "nodejs": { "packageDescription": "A Pulumi package for creating and managing Confluent cloud resources.", @@ -41,7 +43,8 @@ "@types/node": "^10.0.0" }, "compatibility": "tfbridge20", - "disableUnionOutputTypes": true + "disableUnionOutputTypes": true, + "respectSchemaVersion": true }, "python": { "requires": { @@ -49,6 +52,7 @@ }, "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/confluentinc/terraform-provider-confluent)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-confluentcloud` repo](https://github.com/pulumi/pulumi-confluentcloud/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-confluent` repo](https://github.com/confluentinc/terraform-provider-confluent/issues).", "compatibility": "tfbridge20", + "respectSchemaVersion": true, "pyproject": { "enabled": true } diff --git a/provider/resources.go b/provider/resources.go index a3400dec..95d7efea 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -70,8 +70,10 @@ func Provider() tfbridge.ProviderInfo { Tok: tfbridge.MakeResource(mainPkg, mainMod, "ApiKey"), Fields: map[string]*tfbridge.SchemaInfo{ "display_name": tfbridge.AutoName("displayName", 255, "-"), - }}, - "confluent_cluster_link": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "ClusterLink"), + }, + }, + "confluent_cluster_link": { + Tok: tfbridge.MakeResource(mainPkg, mainMod, "ClusterLink"), Fields: map[string]*tfbridge.SchemaInfo{ "link_name": tfbridge.AutoName("link", 255, "-"), }, @@ -81,16 +83,19 @@ func Provider() tfbridge.ProviderInfo { Tok: tfbridge.MakeResource(mainPkg, mainMod, "Environment"), Fields: map[string]*tfbridge.SchemaInfo{ "display_name": tfbridge.AutoName("displayName", 255, "-"), - }}, + }, + }, "confluent_kafka_acl": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "KafkaAcl")}, "confluent_kafka_client_quota": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "KafkaClientQuota")}, - "confluent_kafka_cluster": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "KafkaCluster"), + "confluent_kafka_cluster": { + Tok: tfbridge.MakeResource(mainPkg, mainMod, "KafkaCluster"), Fields: map[string]*tfbridge.SchemaInfo{ "display_name": tfbridge.AutoName("displayName", 255, "-"), "standard": {Name: "standard", MaxItemsOne: tfbridge.True()}, "basic": {Name: "basic", MaxItemsOne: tfbridge.True()}, "dedicated": {Name: "dedicated", MaxItemsOne: tfbridge.True()}, - }}, + }, + }, "confluent_kafka_cluster_config": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "KafkaClusterConfig")}, "confluent_kafka_mirror_topic": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "KafkaMirrorTopic")}, "confluent_kafka_topic": { @@ -147,7 +152,8 @@ func Provider() tfbridge.ProviderInfo { Tok: tfbridge.MakeResource(mainPkg, mainMod, "ServiceAccount"), Fields: map[string]*tfbridge.SchemaInfo{ "display_name": tfbridge.AutoName("displayName", 255, "-"), - }}, + }, + }, "confluent_identity_pool": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "IdentityPool")}, "confluent_identity_provider": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "IdentityProvider")}, "confluent_ksql_cluster": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "KsqlCluster")}, @@ -177,8 +183,10 @@ func Provider() tfbridge.ProviderInfo { "@types/node": "^10.0.0", // so we can access strongly typed node definitions. "@types/mime": "^2.0.0", }, + RespectSchemaVersion: true, }, Python: &tfbridge.PythonInfo{ + RespectSchemaVersion: true, Requires: map[string]string{ "pulumi": ">=3.0.0,<4.0.0", }, @@ -193,8 +201,10 @@ func Provider() tfbridge.ProviderInfo { mainPkg, ), GenerateResourceContainerTypes: true, + RespectSchemaVersion: true, }, CSharp: &tfbridge.CSharpInfo{ + RespectSchemaVersion: true, PackageReferences: map[string]string{ "Pulumi": "3.*", }, diff --git a/sdk/dotnet/Pulumi.ConfluentCloud.csproj b/sdk/dotnet/Pulumi.ConfluentCloud.csproj index 6842c289..5315af73 100644 --- a/sdk/dotnet/Pulumi.ConfluentCloud.csproj +++ b/sdk/dotnet/Pulumi.ConfluentCloud.csproj @@ -9,6 +9,7 @@ https://www.pulumi.com https://github.com/pulumi/pulumi-confluentcloud logo.png + 1.0.0-alpha.0+dev net6.0 enable diff --git a/sdk/dotnet/pulumi-plugin.json b/sdk/dotnet/pulumi-plugin.json index 1acefc42..94b3a0da 100644 --- a/sdk/dotnet/pulumi-plugin.json +++ b/sdk/dotnet/pulumi-plugin.json @@ -1,4 +1,5 @@ { "resource": true, - "name": "confluentcloud" + "name": "confluentcloud", + "version": "1.0.0-alpha.0+dev" } diff --git a/sdk/go/confluentcloud/internal/pulumiUtilities.go b/sdk/go/confluentcloud/internal/pulumiUtilities.go index dcb0196a..2fd6721f 100644 --- a/sdk/go/confluentcloud/internal/pulumiUtilities.go +++ b/sdk/go/confluentcloud/internal/pulumiUtilities.go @@ -165,7 +165,7 @@ func callPlainInner( func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - version := SdkVersion + version := semver.MustParse("1.0.0-alpha.0+dev") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } @@ -176,7 +176,7 @@ func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOptio func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { defaults := []pulumi.InvokeOption{} - version := SdkVersion + version := semver.MustParse("1.0.0-alpha.0+dev") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } diff --git a/sdk/go/confluentcloud/pulumi-plugin.json b/sdk/go/confluentcloud/pulumi-plugin.json index 1acefc42..94b3a0da 100644 --- a/sdk/go/confluentcloud/pulumi-plugin.json +++ b/sdk/go/confluentcloud/pulumi-plugin.json @@ -1,4 +1,5 @@ { "resource": true, - "name": "confluentcloud" + "name": "confluentcloud", + "version": "1.0.0-alpha.0+dev" } diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index 15b9cc92..4d8acd0c 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@pulumi/confluentcloud", - "version": "${VERSION}", + "version": "1.0.0-alpha.0+dev", "description": "A Pulumi package for creating and managing Confluent cloud resources.", "keywords": [ "pulumi", @@ -23,6 +23,7 @@ }, "pulumi": { "resource": true, - "name": "confluentcloud" + "name": "confluentcloud", + "version": "1.0.0-alpha.0+dev" } } diff --git a/sdk/python/pulumi_confluentcloud/pulumi-plugin.json b/sdk/python/pulumi_confluentcloud/pulumi-plugin.json index 1acefc42..94b3a0da 100644 --- a/sdk/python/pulumi_confluentcloud/pulumi-plugin.json +++ b/sdk/python/pulumi_confluentcloud/pulumi-plugin.json @@ -1,4 +1,5 @@ { "resource": true, - "name": "confluentcloud" + "name": "confluentcloud", + "version": "1.0.0-alpha.0+dev" } diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index 235b70b7..47747ac0 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -5,7 +5,7 @@ keywords = ["pulumi", "confluentcloud", "category/cloud"] readme = "README.md" requires-python = ">=3.8" - version = "0.0.0" + version = "1.0.0a0+dev" [project.license] text = "Apache-2.0" [project.urls]