From 1914a2de10bb2df7f90784af9d87065e0add5637 Mon Sep 17 00:00:00 2001 From: Pulumi Bot Date: Mon, 23 Dec 2024 21:31:50 +0000 Subject: [PATCH 1/6] [internal] Update GitHub Actions workflow files --- .github/workflows/build_sdk.yml | 42 ++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_sdk.yml b/.github/workflows/build_sdk.yml index 9dbc4d36f..b7f142a64 100644 --- a/.github/workflows/build_sdk.yml +++ b/.github/workflows/build_sdk.yml @@ -33,7 +33,9 @@ jobs: name: build_sdk runs-on: ubuntu-latest strategy: - fail-fast: true + # We normally fail fast unless this is a PR from Renovate in which case + # we'll always build all SDKs in case there are any changes to commit. + fail-fast: ${{ ! contains(github.actor, 'renovate') }} matrix: language: - nodejs @@ -67,14 +69,52 @@ jobs: - name: Build SDK run: make build_${{ matrix.language }} - name: Check worktree clean + id: worktreeClean uses: pulumi/git-status-check-action@v1 with: + # Keep these in sync with the Renovate step below to avoid them getting checked in. allowed-changes: | sdk/**/pulumi-plugin.json sdk/dotnet/*.csproj sdk/go/**/pulumiUtilities.go sdk/nodejs/package.json sdk/python/pyproject.toml + - name: Commit ${{ matrix.language }} SDK changes for Renovate + # If the worktree is dirty and this is a Renovate PR to bump + # dependencies, commit the updated SDK and push it back to the PR. The + # job will still be marked as a failure. + if: failure() && steps.worktreeClean.outcome == 'failure' && contains(github.actor, 'renovate') + shell: bash + run: | + git config --global user.email "bot@pulumi.com" + git config --global user.name "pulumi-bot" + + # Stash local changes and check out the PR's branch directly. + git stash + git fetch + git checkout "origin/$HEAD_REF" + + # Apply and add our changes, but don't commit any files we expect to + # always change due to versioning. + git stash pop + git add sdk + git reset \ + sdk/python/*/pulumi-plugin.json \ + sdk/dotnet/Pulumi.*.csproj \ + sdk/go/*/internal/pulumiUtilities.go \ + sdk/nodejs/package.json \ + sdk/python/pyproject.toml + git commit -m 'Commit ${{ matrix.language }} SDK for Renovate' + + # Push with pulumi-bot credentials to trigger a re-run of the + # workflow. https://github.com/orgs/community/discussions/25702 + git push https://pulumi-bot:${{ secrets.PULUMI_BOT_TOKEN }}@github.com/${{ github.repository }} \ + "HEAD:$HEAD_REF" + env: + # head_ref is untrusted so it's recommended to pass via env var to + # avoid injections. + HEAD_REF: ${{ github.head_ref }} + - name: Upload SDK uses: ./.github/actions/upload-sdk with: From 900d9e0bd2ffcf9bb85ceb323dfc6a0ea09e3631 Mon Sep 17 00:00:00 2001 From: Bryce Lampe Date: Mon, 23 Dec 2024 13:34:52 -0800 Subject: [PATCH 2/6] Manually edit SDK --- sdk/dotnet/README.md | 1 - sdk/nodejs/index.ts | 3 --- sdk/python/README.md | 9 --------- 3 files changed, 13 deletions(-) diff --git a/sdk/dotnet/README.md b/sdk/dotnet/README.md index 331b0bf9f..e69de29bb 100644 --- a/sdk/dotnet/README.md +++ b/sdk/dotnet/README.md @@ -1 +0,0 @@ -A Pulumi package to safely use randomness in Pulumi programs. diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index cd59ef96b..657d0e15f 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -1,6 +1,3 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; diff --git a/sdk/python/README.md b/sdk/python/README.md index c6438a0e5..506683fb0 100644 --- a/sdk/python/README.md +++ b/sdk/python/README.md @@ -1,12 +1,3 @@ -[![Actions Status](https://github.com/pulumi/pulumi-random/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-random/actions) -[![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) -[![NPM version](https://badge.fury.io/js/%40pulumi%2Frandom.svg)](https://npmjs.com/package/@pulumi/random) -[![NuGet version](https://badge.fury.io/nu/pulumi.random.svg)](https://badge.fury.io/nu/pulumi.random) -[![Python version](https://badge.fury.io/py/pulumi-random.svg)](https://pypi.org/project/pulumi-random) -[![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-random/sdk/v4/go)](https://pkg.go.dev/github.com/pulumi/pulumi-random/sdk/v4/go) -[![License](https://img.shields.io/npm/l/%40pulumi%2Fpulumi.svg)](https://github.com/pulumi/pulumi-random/blob/master/LICENSE) - -# Random Provider The random provider allows the safe use of randomness in a Pulumi program. This allows you to generate resource properties, such as names, that contain randomness in a way that works with Pulumi's goal state oriented approach. From c979351d6030be03324b43981a97229739bf706a Mon Sep 17 00:00:00 2001 From: Bryce Lampe Date: Mon, 23 Dec 2024 13:48:48 -0800 Subject: [PATCH 3/6] relax user constraint --- .github/workflows/build_sdk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_sdk.yml b/.github/workflows/build_sdk.yml index b7f142a64..c05b3017c 100644 --- a/.github/workflows/build_sdk.yml +++ b/.github/workflows/build_sdk.yml @@ -83,7 +83,7 @@ jobs: # If the worktree is dirty and this is a Renovate PR to bump # dependencies, commit the updated SDK and push it back to the PR. The # job will still be marked as a failure. - if: failure() && steps.worktreeClean.outcome == 'failure' && contains(github.actor, 'renovate') + if: failure() && steps.worktreeClean.outcome == 'failure' shell: bash run: | git config --global user.email "bot@pulumi.com" From 06e54b8b8f435ac33f0891e321689e32d88dd07e Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Mon, 23 Dec 2024 21:52:06 +0000 Subject: [PATCH 4/6] Commit nodejs SDK for Renovate --- sdk/nodejs/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index 657d0e15f..cd59ef96b 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -1,3 +1,6 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; From ab4da4f2a349bc10923d443fd60334e4df7643a0 Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Mon, 23 Dec 2024 21:55:13 +0000 Subject: [PATCH 5/6] Commit dotnet SDK for Renovate --- sdk/dotnet/README.md | 1 + sdk/dotnet/pulumi-plugin.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/dotnet/README.md b/sdk/dotnet/README.md index e69de29bb..331b0bf9f 100644 --- a/sdk/dotnet/README.md +++ b/sdk/dotnet/README.md @@ -0,0 +1 @@ +A Pulumi package to safely use randomness in Pulumi programs. diff --git a/sdk/dotnet/pulumi-plugin.json b/sdk/dotnet/pulumi-plugin.json index 45c67e84a..758d53bc2 100644 --- a/sdk/dotnet/pulumi-plugin.json +++ b/sdk/dotnet/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, "name": "random", - "version": "4.0.0-alpha.0+dev" + "version": "4.17.0-alpha.1734990728+12633f5" } From 8219c1f3599b9cd0f8bd321daaec1a99eb93c304 Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Mon, 23 Dec 2024 21:55:16 +0000 Subject: [PATCH 6/6] Commit python SDK for Renovate --- sdk/python/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdk/python/README.md b/sdk/python/README.md index 506683fb0..c6438a0e5 100644 --- a/sdk/python/README.md +++ b/sdk/python/README.md @@ -1,3 +1,12 @@ +[![Actions Status](https://github.com/pulumi/pulumi-random/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-random/actions) +[![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) +[![NPM version](https://badge.fury.io/js/%40pulumi%2Frandom.svg)](https://npmjs.com/package/@pulumi/random) +[![NuGet version](https://badge.fury.io/nu/pulumi.random.svg)](https://badge.fury.io/nu/pulumi.random) +[![Python version](https://badge.fury.io/py/pulumi-random.svg)](https://pypi.org/project/pulumi-random) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-random/sdk/v4/go)](https://pkg.go.dev/github.com/pulumi/pulumi-random/sdk/v4/go) +[![License](https://img.shields.io/npm/l/%40pulumi%2Fpulumi.svg)](https://github.com/pulumi/pulumi-random/blob/master/LICENSE) + +# Random Provider The random provider allows the safe use of randomness in a Pulumi program. This allows you to generate resource properties, such as names, that contain randomness in a way that works with Pulumi's goal state oriented approach.