pulumi/pkg
bors[bot] 818d055a77
Merge #11701
11701: Revert "Simplified invokes: SDK-gen and program-gen implementation for dotnet and nodejs" r=iwahbe a=AaronFriel

Reverts pulumi/pulumi#11418.

Fixes #11699. The addition of the `ReturnType` field on `schema.FunctionSpec` broke the API contract between Pulumi's codegen package and tfbridge and other tools.

From my comment on #11699.

> I was able to bisect pu/pu to a commit that had the issue, but couldn't reproduce the behavior with a synthetic schema. PR #11418 should be reverted because it introduces the breaking change, and before that PR is reintroduced, the breaking change to the schema should be addressed.
> 
> Notes on root causing:
> 
> Adding an unserialized `ReturnType` field on the `schema.FunctionSpec` type was a breaking change in the API contract with the tfgen bridge and any other tools that generate a PackageSpec directly (without marshaling/unmarshaling) before binding it and calling `GeneratePackage`.
> 
> In [cd6f658](cd6f658d3d) we can see that a regression test fails to catch this case, the generated code is correct and matches the "before" case! That's because the regression tests in Pulumi load schemas from JSON, so the `ReturnType` field is populated. That occurs in the implementation of `unmarshalFunctionSpec` at line 1656:
> 
> 78c9bf4ee4/pkg/codegen/schema/schema.go (L1649-L1658)
> 
> This function in the bridge is unaware of the new field, and so it only populates `Outputs`.
> 
> 36b10921bf/pkg/tfgen/generate_schema.go (L607-L638)




Co-authored-by: Aaron Friel <mayreply@aaronfriel.com>
2022-12-21 10:33:07 +00:00
..
authhelpers Add support for authentication via GOOGLE_CREDENTIALS (#6379) 2022-06-07 16:02:08 +01:00
backend [display] Hide the cursor in interactive mode. 2022-12-20 10:56:59 -08:00
cmd/pulumi Merge #11692 2022-12-20 12:29:47 +00:00
codegen Merge #11701 2022-12-21 10:33:07 +00:00
engine Add tests to ensure `pulumi:pulumi:getResource` keeps resource refs 2022-12-16 15:38:46 -05:00
graph Update error handling (#8406) 2021-11-12 18:37:17 -08:00
operations ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
resource feat(sdk/nodejs): delegates alias computation to the engine 2022-12-15 17:23:31 -05:00
secrets Add tests for awskms secret manager 2022-12-02 13:38:28 +00:00
testing/integration Fix test failure on Windows 2022-12-13 12:21:36 -08:00
util cli: Clean up previous yamlutil package, update new commands 2022-12-10 12:29:33 -08:00
version duplicate version to ensure linking is properly handled 2020-03-19 12:49:34 -07:00
README.md export codegen tests for internal use (#8928) 2022-02-07 12:10:04 +01:00
go.mod chore: post-release go.mod updates 2022-12-19 21:44:16 +00:00
go.sum Merge #11665 2022-12-16 11:35:04 +00:00

README.md

pulumi/pkg

While pulumi/sdk maintains strict backwards compatibility guarantees, code under pkg/ is handled more informally: while breaking changes are still discouraged they may happen when they make sense.