diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 83712458..f8873aa5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -106,6 +106,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 ccd575de..9fe2a652 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -107,6 +107,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 @@ -310,6 +317,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 2b59c4ab..8b92bfb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,6 +106,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 @@ -337,9 +344,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 09ad8c75..9ab1eed5 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -116,6 +116,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-databricks/schema.json b/provider/cmd/pulumi-resource-databricks/schema.json index b29c78eb..493061c7 100644 --- a/provider/cmd/pulumi-resource-databricks/schema.json +++ b/provider/cmd/pulumi-resource-databricks/schema.json @@ -20,12 +20,14 @@ "packageReferences": { "Pulumi": "3.*" }, - "compatibility": "tfbridge20" + "compatibility": "tfbridge20", + "respectSchemaVersion": true }, "go": { "importBasePath": "github.com/pulumi/pulumi-databricks/sdk/go/databricks", "generateResourceContainerTypes": true, - "generateExtraInputTypes": true + "generateExtraInputTypes": true, + "respectSchemaVersion": true }, "nodejs": { "packageDescription": "A Pulumi package for creating and managing databricks cloud resources.", @@ -38,7 +40,8 @@ "@types/node": "^10.0.0" }, "compatibility": "tfbridge20", - "disableUnionOutputTypes": true + "disableUnionOutputTypes": true, + "respectSchemaVersion": true }, "python": { "requires": { @@ -46,6 +49,7 @@ }, "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/databricks/terraform-provider-databricks)\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-databricks` repo](https://github.com/pulumi/pulumi-databricks/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-databricks` repo](https://github.com/databricks/terraform-provider-databricks/issues).", "compatibility": "tfbridge20", + "respectSchemaVersion": true, "pyproject": { "enabled": true } diff --git a/provider/resources.go b/provider/resources.go index 38b98d44..a0949800 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -153,8 +153,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", }, @@ -168,8 +170,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.Databricks.csproj b/sdk/dotnet/Pulumi.Databricks.csproj index aa2b657c..d877dcf6 100644 --- a/sdk/dotnet/Pulumi.Databricks.csproj +++ b/sdk/dotnet/Pulumi.Databricks.csproj @@ -9,6 +9,7 @@ https://www.pulumi.com https://github.com/pulumi/pulumi-databricks 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 60fad06e..fa055a53 100644 --- a/sdk/dotnet/pulumi-plugin.json +++ b/sdk/dotnet/pulumi-plugin.json @@ -1,4 +1,5 @@ { "resource": true, - "name": "databricks" + "name": "databricks", + "version": "1.0.0-alpha.0+dev" } diff --git a/sdk/go/databricks/internal/pulumiUtilities.go b/sdk/go/databricks/internal/pulumiUtilities.go index 7a649660..23f144bd 100644 --- a/sdk/go/databricks/internal/pulumiUtilities.go +++ b/sdk/go/databricks/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/databricks/pulumi-plugin.json b/sdk/go/databricks/pulumi-plugin.json index 60fad06e..fa055a53 100644 --- a/sdk/go/databricks/pulumi-plugin.json +++ b/sdk/go/databricks/pulumi-plugin.json @@ -1,4 +1,5 @@ { "resource": true, - "name": "databricks" + "name": "databricks", + "version": "1.0.0-alpha.0+dev" } diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index ace7f222..4d3f412d 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@pulumi/databricks", - "version": "${VERSION}", + "version": "1.0.0-alpha.0+dev", "description": "A Pulumi package for creating and managing databricks cloud resources.", "keywords": [ "pulumi", @@ -23,6 +23,7 @@ }, "pulumi": { "resource": true, - "name": "databricks" + "name": "databricks", + "version": "1.0.0-alpha.0+dev" } } diff --git a/sdk/python/pulumi_databricks/pulumi-plugin.json b/sdk/python/pulumi_databricks/pulumi-plugin.json index 60fad06e..fa055a53 100644 --- a/sdk/python/pulumi_databricks/pulumi-plugin.json +++ b/sdk/python/pulumi_databricks/pulumi-plugin.json @@ -1,4 +1,5 @@ { "resource": true, - "name": "databricks" + "name": "databricks", + "version": "1.0.0-alpha.0+dev" } diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index 2e209bf9..77179fa4 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -5,7 +5,7 @@ keywords = ["pulumi", "databricks", "category/infrastructure"] readme = "README.md" requires-python = ">=3.8" - version = "0.0.0" + version = "1.0.0a0+dev" [project.license] text = "Apache-2.0" [project.urls]