Skip to content

Commit

Permalink
Merge branch 'master' into simplified-invoke-gen
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaid-Ajaj committed Dec 12, 2022
2 parents 378db6c + 56be165 commit c8d8e45
Show file tree
Hide file tree
Showing 183 changed files with 4,397 additions and 1,233 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci-run-test.yml
Expand Up @@ -50,6 +50,11 @@ on:
"nodejs": "14.x",
"python": "3.9.x"
}
continue-on-error:
description: "Whether to continue running the job if the step fails"
required: false
default: false
type: boolean


defaults:
Expand Down Expand Up @@ -84,6 +89,8 @@ jobs:

runs-on: ${{ inputs.platform }}

timeout-minutes: 60
continue-on-error: ${{ inputs.continue-on-error }}
steps:
- name: "Windows cache workaround"
# https://github.com/actions/cache/issues/752#issuecomment-1222415717
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -293,6 +293,7 @@ jobs:
name: Smoke Test${{ matrix.platform && '' }}
needs: [matrix, build-binaries, build-sdks]
if: ${{ needs.matrix.outputs.smoke-test-matrix != '{}' }}
# alow jobs to fail if the platform contains windows
strategy:
fail-fast: ${{ contains(needs.matrix.outputs.smoke-test-matrix, 'macos') }}
matrix: ${{ fromJson(needs.matrix.outputs.smoke-test-matrix) }}
Expand All @@ -309,6 +310,7 @@ jobs:
# require-build: false # TODO, remove ${{ matrix.require-build || false }}

version-set: ${{ toJson(matrix.version-set) }}
continue-on-error: ${{ contains(matrix.platform, 'windows') }}
secrets: inherit

test-collect-reports:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-pr.yml
Expand Up @@ -71,7 +71,7 @@ jobs:

prepare-release:
name: prepare
if: |
if: >- # No newlines or trailing newline.
${{
github.event.pull_request.head.repo.full_name == github.repository
&& contains(github.event.pull_request.labels.*.name, 'ci/test')
Expand Down
2 changes: 1 addition & 1 deletion .version
@@ -1 +1 @@
3.48.1
3.49.1
62 changes: 62 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,67 @@
# Changelog

## 3.49.0 (2022-12-08)


### Features

- [sdk] Add methods to cast pointer types to corresponding Pulumi Ptr types
[#11539](https://github.com/pulumi/pulumi/pull/11539)

- [yaml] [Updates Pulumi YAML to v1.0.4](https://github.com/pulumi/pulumi-yaml/releases/tag/v1.0.4) unblocking Docker Image resource support in a future Docker provider release.
[#11583](https://github.com/pulumi/pulumi/pull/11583)

- [backend/service] Allows the service to opt into a bandwidth-optimized DIFF protocol for storing checkpoints. Previously this required setting the PULUMI_OPTIMIZED_CHECKPOINT_PATCH env variable on the client. This env variable is now deprecated.
[#11421](https://github.com/pulumi/pulumi/pull/11421)

- [cli/about] Add fully qualified stack name to current stack.
[#11387](https://github.com/pulumi/pulumi/pull/11387)

- [sdk/{dotnet,nodejs}] Add InvokeSingle variants to dotnet and nodejs SDKs
[#11564](https://github.com/pulumi/pulumi/pull/11564)


### Bug Fixes

- [docs] Exclude id output property for component resources
[#11469](https://github.com/pulumi/pulumi/pull/11469)

- [engine] Fix an assert for resources being replaced but also pending deletion.
[#11475](https://github.com/pulumi/pulumi/pull/11475)

- [pkg] Fixes codegen/python generation of non-string secrets in provider properties
[#11494](https://github.com/pulumi/pulumi/pull/11494)

- [pkg/testing] Optionally caches python venvs for testing
[#11532](https://github.com/pulumi/pulumi/pull/11532)

- [programgen] Improve error message for invalid enum values on `pulumi convert`.
[#11019](https://github.com/pulumi/pulumi/pull/11019)

- [programgen] Interpret schema.Asset as pcl.AssetOrArchive.
[#11593](https://github.com/pulumi/pulumi/pull/11593)

- [programgen/go] Convert the result of immediate invokes to ouputs when necessary.
[#11480](https://github.com/pulumi/pulumi/pull/11480)

- [programgen/nodejs] Add `.` between `?` and `[`.
[#11477](https://github.com/pulumi/pulumi/pull/11477)

- [programgen/nodejs] Fix capitalization when generating `fs.readdirSync`.
[#11478](https://github.com/pulumi/pulumi/pull/11478)

- [sdk/nodejs] Fix regression when passing a provider to a MLC
[#11509](https://github.com/pulumi/pulumi/pull/11509)

- [sdk/python] Allows for duplicate output values in python
[#11559](https://github.com/pulumi/pulumi/pull/11559)

- [sdkgen/go] Fixes superfluous newline being added between documentation comment and package statement in doc.go
[#11492](https://github.com/pulumi/pulumi/pull/11492)

- [sdkgen/nodejs] Generate JS doc comments for output-versioned invokes and use explicit any type.
[#11511](https://github.com/pulumi/pulumi/pull/11511)

## 3.48.0 (2022-11-23)


Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -0,0 +1,4 @@
changes:
- type: fix
scope: sdkgen/nodejs,dotnet
description: Fix imports when a component is using another component from the same schema as a property

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -0,0 +1,4 @@
changes:
- type: feat
scope: sdk/nodejs
description: Emit closure requires in global scope for improved cold start on Lambda

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -0,0 +1,4 @@
changes:
- type: feat
scope: sdk/dotnet
description: Add Output.JsonSerialize using System.Text.Json.

This file was deleted.

@@ -0,0 +1,4 @@
changes:
- type: chore
scope: sdk/nodejs
description: Remove function serialization code for out of suppport NodeJS versions.
6 changes: 0 additions & 6 deletions changelog/pending/20221207--yaml--updates-yaml-to-1-0-4.yaml

This file was deleted.

@@ -0,0 +1,4 @@
changes:
- type: fix
scope: sdk/python
description: Fix a deadlock on provider-side error with automation api
@@ -0,0 +1,4 @@
changes:
- type: fix
scope: sdkgen/dotnet,go,nodejs,python
description: Do not generate Result types for functions with empty outputs
@@ -0,0 +1,4 @@
changes:
- type: feat
scope: sdk/go
description: Add JSONMarshal to go sdk.
@@ -0,0 +1,4 @@
changes:
- type: feat
scope: sdk/nodejs
description: Add output jsonStringify using JSON.stringify.
8 changes: 8 additions & 0 deletions developer-docs/providers/metaschema.md
Expand Up @@ -618,6 +618,14 @@ Specifies whether a change to the property causes its containing resource to be

---

#### `willReplaceOnChanges`

Indicates that the provider will replace the resource when this property is changed.

`boolean`

---

#### `secret`

Specifies whether the property is secret (default false).
Expand Down
19 changes: 6 additions & 13 deletions pkg/backend/filestate/backend_test.go
Expand Up @@ -3,7 +3,6 @@ package filestate
import (
"context"
"encoding/json"
"io/ioutil"
"os"
"path"
"path/filepath"
Expand Down Expand Up @@ -143,8 +142,7 @@ func makeUntypedDeployment(name tokens.QName, phrase, state string) (*apitype.Un
//nolint:paralleltest // mutates environment variables
func TestListStacksWithMultiplePassphrases(t *testing.T) {
// Login to a temp dir filestate backend
tmpDir, err := ioutil.TempDir("", "filestatebackend")
assert.NoError(t, err)
tmpDir := t.TempDir()
b, err := New(cmdutil.Diag(), "file://"+filepath.ToSlash(tmpDir))
assert.NoError(t, err)
ctx := context.Background()
Expand Down Expand Up @@ -205,8 +203,7 @@ func TestDrillError(t *testing.T) {
t.Parallel()

// Login to a temp dir filestate backend
tmpDir, err := ioutil.TempDir("", "filestatebackend")
assert.NoError(t, err)
tmpDir := t.TempDir()
b, err := New(cmdutil.Diag(), "file://"+filepath.ToSlash(tmpDir))
assert.NoError(t, err)
ctx := context.Background()
Expand All @@ -224,8 +221,7 @@ func TestCancel(t *testing.T) {
t.Parallel()

// Login to a temp dir filestate backend
tmpDir, err := ioutil.TempDir("", "filestatebackend")
assert.NoError(t, err)
tmpDir := t.TempDir()
b, err := New(cmdutil.Diag(), "file://"+filepath.ToSlash(tmpDir))
assert.NoError(t, err)
ctx := context.Background()
Expand Down Expand Up @@ -286,8 +282,7 @@ func TestRemoveMakesBackups(t *testing.T) {
t.Parallel()

// Login to a temp dir filestate backend
tmpDir, err := ioutil.TempDir("", "filestatebackend")
assert.NoError(t, err)
tmpDir := t.TempDir()
b, err := New(cmdutil.Diag(), "file://"+filepath.ToSlash(tmpDir))
assert.NoError(t, err)
ctx := context.Background()
Expand Down Expand Up @@ -330,8 +325,7 @@ func TestRenameWorks(t *testing.T) {
t.Parallel()

// Login to a temp dir filestate backend
tmpDir, err := ioutil.TempDir("", "filestatebackend")
assert.NoError(t, err)
tmpDir := t.TempDir()
b, err := New(cmdutil.Diag(), "file://"+filepath.ToSlash(tmpDir))
assert.NoError(t, err)
ctx := context.Background()
Expand Down Expand Up @@ -445,8 +439,7 @@ func TestHtmlEscaping(t *testing.T) {
}

// Login to a temp dir filestate backend
tmpDir, err := ioutil.TempDir("", "filestatebackend")
assert.NoError(t, err)
tmpDir := t.TempDir()
b, err := New(cmdutil.Diag(), "file://"+filepath.ToSlash(tmpDir))
assert.NoError(t, err)
ctx := context.Background()
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/pulumi/convert.go
Expand Up @@ -178,6 +178,8 @@ func runConvert(
projectGenerator = yamlgen.GenerateProject
case "pulumi", "pcl":
if cmdutil.IsTruthy(os.Getenv("PULUMI_DEV")) {
// No plugin for PCL to install dependencies with
generateOnly = true
projectGenerator = pclGenerateProject
break
}
Expand Down Expand Up @@ -214,8 +216,6 @@ func runConvert(
}
} else if from == "pcl" {
if cmdutil.IsTruthy(os.Getenv("PULUMI_DEV")) {
// No plugin for PCL to generate with
generateOnly = true
proj, program, err = pclEject(cwd, loader)
if err != nil {
return result.FromError(fmt.Errorf("could not load pcl program: %w", err))
Expand Down
3 changes: 1 addition & 2 deletions pkg/cmd/pulumi/convert_test.go
Expand Up @@ -41,8 +41,7 @@ func TestPclConvert(t *testing.T) {
t.Setenv("PULUMI_DEV", "TRUE")

// Check that we can run convert from PCL to PCL
tmp, err := os.MkdirTemp("", "pulumi-convert-test")
assert.NoError(t, err)
tmp := t.TempDir()

result := runConvert("pcl_convert_testdata", []string{}, "pcl", "pcl", tmp, true)
assert.Nil(t, result)
Expand Down
3 changes: 2 additions & 1 deletion pkg/cmd/pulumi/new.go
Expand Up @@ -435,8 +435,9 @@ func newNewCmd() *cobra.Command {
Long: "Create a new Pulumi project and stack from a template.\n" +
"\n" +
"To create a project from a specific template, pass the template name (such as `aws-typescript`\n" +
"or `azure-python`). If no template name is provided, a list of suggested templates will be presented\n" +
"or `azure-python`). If no template name is provided, a list of suggested templates will be presented\n" +
"which can be selected interactively.\n" +
"For testing, a path to a local template may be passed instead (such as `~/templates/aws-typescript`)\n" +
"\n" +
"By default, a stack created using the pulumi.com backend will use the pulumi.com secrets\n" +
"provider and a stack created using the local or cloud object storage backend will use the\n" +
Expand Down
5 changes: 1 addition & 4 deletions pkg/cmd/pulumi/policy_new_smoke_test.go
Expand Up @@ -16,8 +16,6 @@ package main

import (
"context"
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
Expand All @@ -29,8 +27,7 @@ import (
func TestCreatingPolicyPackWithArgsSpecifiedName(t *testing.T) {
skipIfShortOrNoPulumiAccessToken(t)

tempdir, _ := ioutil.TempDir("", "test-env")
defer os.RemoveAll(tempdir)
tempdir := t.TempDir()
chdir(t, tempdir)

var args = newPolicyArgs{
Expand Down

0 comments on commit c8d8e45

Please sign in to comment.