Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
11559: fix(sdk/python): Allow for duplicate output values in python programs r=kpitzen a=kpitzen

I used the node SDK as inspiration for this change - there were a few things we were doing differently in python (specifically handling all cases in the outer layer of `massage` rather than allowing for more fine-grained control in a `massage_complex` function like in node.  We also take the stack concept from the node SDK to resolve the immediate issue of duplicate outputs.

<!--- 
Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. -->

Fixes #11133 

## Checklist

<!--- Please provide details if the checkbox below is to be left unchecked. -->
- [x] I have added tests that prove my fix is effective or that my feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the Pulumi Service,
then the service should honor older versions of the CLI where this change would not exist.
You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version
  <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->


11588: Don't use *schema.Package in go codegen r=iwahbe a=iwahbe

Part of #9932
Builds on #11578

tldr: Package is not reliable when its used for an external package. We are transferring over to PackageReference, and will remove the Package field once all references to it have been removed.

11589: Don't use `*schema.Package` in nodejs codegen r=iwahbe a=iwahbe

Part of #9932
Builds on #11578

tldr: Package is not reliable when its used for an external package. We are transferring over to PackageReference, and will remove the Package field once all references to it have been removed.

Co-authored-by: Kyle Pitzen <kylepitzen@Kyles-MBP.fios-router.home>
Co-authored-by: Ian Wahbe <ian@wahbe.com>
  • Loading branch information
3 people committed Dec 8, 2022
4 parents f6d669c + 592dc92 + 7ae9c18 + 5e9bda0 commit ec246db
Show file tree
Hide file tree
Showing 15 changed files with 306 additions and 169 deletions.
@@ -0,0 +1,4 @@
changes:
- type: fix
scope: sdk/python
description: Allows for duplicate output values in python
5 changes: 4 additions & 1 deletion pkg/codegen/go/doc.go
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/golang/glog"
"github.com/pulumi/pulumi/pkg/v3/codegen"
"github.com/pulumi/pulumi/pkg/v3/codegen/schema"
"github.com/pulumi/pulumi/sdk/v3/go/common/util/contract"
)

const pulumiSDKVersion = "v3"
Expand Down Expand Up @@ -98,7 +99,9 @@ func (d DocLanguageHelper) GetLanguageTypeString(pkg *schema.Package, moduleName

// GeneratePackagesMap generates a map of Go packages for resources, functions and types.
func (d *DocLanguageHelper) GeneratePackagesMap(pkg *schema.Package, tool string, goInfo GoPackageInfo) {
d.packages = generatePackageContextMap(tool, pkg, goInfo, nil)
var err error
d.packages, err = generatePackageContextMap(tool, pkg.Reference(), goInfo, nil)
contract.AssertNoError(err)
}

// GetPropertyName returns the property name specific to Go.
Expand Down

0 comments on commit ec246db

Please sign in to comment.