Skip to content

Commit

Permalink
Merge #11539 #11540
Browse files Browse the repository at this point in the history
11539: Add `*[TYPE]` to `[TYPE]Ptr` methods r=aq17 a=aq17

Fixes #11536
Adds methods to convert pointer types to corresponding pulumi Ptr types

11540: ci: Remove page file tweak for Windows r=aq17 a=AaronFriel

The step to [configure the pagefile on Windows](https://github.com/pulumi/pulumi/actions/runs/3624853251/jobs/6112393713) began failing due to an update to the underlying runner image. Given that this is blocking CI, we'll remove the step for now.

Either #11532 or #11471 should address performance of integration tests and reliability and obviate the need for this step.

Co-authored-by: aq17 <aqiu@pulumi.com>
Co-authored-by: Aaron Friel <mayreply@aaronfriel.com>
  • Loading branch information
3 people committed Dec 6, 2022
3 parents c463045 + 2c40dd9 + 6146a3c commit eda5890
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci-run-test.yml
Expand Up @@ -125,14 +125,6 @@ jobs:
if: ${{ inputs.enable-coverage && runner.os != 'Windows' }}
run: |
echo "PULUMI_TEST_COVERAGE_PATH=$(pwd)/coverage" >> "$GITHUB_ENV"
# See: https://github.com/actions/virtual-environments/issues/2642#issuecomment-774988591
- name: Configure Windows pagefile
uses: aaronfriel/action-configure-pagefile@v2.0-beta.1
if: ${{ runner.os == 'Windows' }}
with:
minimum-size: 4GB
maximum-size: 4GB
disk-root: "D:"
- name: Configure Go Cache Key
env:
CACHE_KEY: "${{ fromJson(inputs.version-set).go }}-${{ runner.os }}-${{ runner.arch }}"
Expand Down
@@ -0,0 +1,4 @@
changes:
- type: feat
scope: sdk
description: Add methods to cast pointer types to corresponding Pulumi Ptr types
6 changes: 6 additions & 0 deletions sdk/go/pulumi/generate/templates/types_builtins.go.template
Expand Up @@ -47,6 +47,12 @@ type {{.PtrType}} {{.ElemElementType}}
func {{.Name}}(v {{.ElemElementType}}) {{.Name}}Input {
return ({{.InputType}})(&v)
}
func {{.Name}}FromPtr(v *{{.ElemElementType}}) {{.Name}}Input {
if v == nil {
return nil
}
return ({{.InputType}})(v)
}
{{end}}
{{if .DefineInputMethods}}
// ElementType returns the element type of this Input ({{.ElementType}}).
Expand Down
36 changes: 36 additions & 0 deletions sdk/go/pulumi/types_builtins.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit eda5890

Please sign in to comment.