-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
10840: [codegen/dotnet] Fix codegen for functions with secret parameters r=justinvp a=justinvp The non-`Output<T>` returning functions take parameters as plain values, which cannot be made secrets. Before this change, .NET codegen was trying to convert the inputs into secrets (for any input property that is marked as a `secret` in the schema), but this would error during compilation because the plain types are not `Input<T>`. Note: Arguably, for the `Output<T>` returning functions, we could force any secret input properties to be secrets since they are typed as `Input<T>`, and similarly, force the resulting `Output<T>` to be a secret if any of the output properties are marked as secret. But that is something we could consider doing subsequently, as it would be a change for all languages. Tracking this in #10841. Fixes #10838 Co-authored-by: Justin Van Patten <jvp@justinvp.com>
- Loading branch information
Showing
42 changed files
with
2,333 additions
and
1 deletion.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
changelog/pending/20220923--sdkgen-dotnet--dotnet-codegen-functions-secrets.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
changes: | ||
- type: fix | ||
scope: sdkgen/dotnet | ||
description: Fixes a .NET SDK codegen bug when emitting functions with secret parameters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
pkg/codegen/testing/test/testdata/functions-secrets/docs/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: "mypkg" | ||
title_tag: "mypkg.mypkg" | ||
meta_desc: "" | ||
layout: api | ||
no_edit_this_page: true | ||
--- | ||
|
||
<!-- WARNING: this file was generated by test. --> | ||
<!-- Do not edit by hand unless you're certain you know what you are doing! --> | ||
|
||
|
||
|
||
<h2 id="resources">Resources</h2> | ||
<ul class="api"> | ||
<li><a href="provider" title="Provider"><span class="api-symbol api-symbol--resource"></span>Provider</a></li> | ||
</ul> | ||
|
||
<h2 id="functions">Functions</h2> | ||
<ul class="api"> | ||
<li><a href="funcwithsecrets" title="FuncWithSecrets"><span class="api-symbol api-symbol--function"></span>FuncWithSecrets</a></li> | ||
</ul> | ||
|
||
<h2 id="package-details">Package Details</h2> | ||
<dl class="package-details"> | ||
<dt>Repository</dt> | ||
<dd><a href=""></a></dd> | ||
<dt>License</dt> | ||
<dd></dd> | ||
<dt>Version</dt> | ||
<dd>0.0.1</dd> | ||
</dl> | ||
|
7 changes: 7 additions & 0 deletions
7
pkg/codegen/testing/test/testdata/functions-secrets/docs/codegen-manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"emittedFiles": [ | ||
"_index.md", | ||
"funcwithsecrets/_index.md", | ||
"provider/_index.md" | ||
] | ||
} |
485 changes: 485 additions & 0 deletions
485
pkg/codegen/testing/test/testdata/functions-secrets/docs/funcwithsecrets/_index.md
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.