* Use the display name from the schema, if available
* Update comment on the titleLookup map
* Add examples of reserved labels that can be used with the Keywords array in the schema
* Validate python version
Note: we do this at the language plugin level because extremely old
version of python (python2) have different syntax, and we don't want
parse errors to occlude our version message. Similarly, if we rely on a
3.7 feature during an import, we will have the same problem.
* Set minimum python version to 3.7.0
* Fix displayed recommended version
* Toward doc gen of fn.Output version signatures
* Fixup Python docgen, and reorder forms so the direct form comes firs
* Respect go opt-out flag
* Fix tempalte bug with unbalanced HTML tags
* Edit CHANGELOG_PENDING.md
* Merge codeblocks in the function template
* Accept docs changes
Something has changed in the base image such that the directory
/etc/sudoers.d doesn't exist. Simple fix, `mkdir -p` that directory
before we write to it.
When importing a resource in Go, we change resource names with hyphens to snake_case. This happens because we introduced a change that converts the resource name to a valid Go identifier so it can be used as a local variable. But we were also using this converted name as the string resource name, which causes problems with import: the imported resource in the state file has the original resource name, but the generated program uses the converted name, causing Pulumi to delete and recreate the resource when adopting the generated import code.
This change fixes the issue by maintaining the original resource name, and only using the converted name for variables.
Fixes two bugs in how padding was calculated in PrintTable.
Firstly we remove all ANSI escape codes from the string before measuring
how wide it is. Secondly we measure glyph count (using rivo/uniseg) not
byte or rune count of the string.
Together these fix the padding/alignment issues I saw when using
PrintTable with plan output. They also slightly change the layout of
"pulumi stack", for example the below is printed with current master and
has 6 characters of space for padding between SecurityGroup and
web-secgrp:
```
Current stack resources (4):
TYPE NAME
pulumi:pulumi:Stack aws-cs-webserver-test
├─ aws:ec2/securityGroup:SecurityGroup web-secgrp
├─ aws:ec2/instance:Instance web-server-www
└─ pulumi:providers:aws default_4_25_0
```
While printed with this commit you only get 2 characters of space for
padding (which is correct, the column gap is set to " "):
```
Current stack resources (4):
TYPE NAME
pulumi:pulumi:Stack aws-cs-webserver-test
├─ aws:ec2/securityGroup:SecurityGroup web-secgrp
├─ aws:ec2/instance:Instance web-server-www
└─ pulumi:providers:aws default_4_25_0
```
- Remove enumElementType, whose functionality duplicates work done in
argsTypeImpl
- Clarify the args- vs. Go-ness of the two element types
This is prep work for #7943. These changes should not produce codegen diffs.
Currently this is just setting go.buildTags to "all" so the language
specific tests are included in build and test commands by default.
Missing this leads to the confusing (at least to new people) behavior
of clicking run test on a test method and vscode then saying there is no
test to run.
* Don't throw on type mismatches in the dotnet sdk
Fixes#7329
The converter will no longer throw if resource providers return data
that does not match the expected type declared in the dotnet sdk.
Instead a warning will be logged for the resource and the value will be
set to `default(T)`.
While our CI seems happy with this line of code on master, my machine
with the 3.1 sdk is resolving it to non-nullable type and complaining
about the "= null" line later.
```
LocalWorkspace.cs(389,27): error CS8600: Converting null literal or
possible null value to non-nullable type.
[/workspaces/pulumi/sdk/dotnet/Pulumi.Automation/Pulumi.Automation.csproj]
```
Quick fix to just not use "var" here.
* .NET & python SDKs parity for bad pulumi versions
They handle invalid Pulumi CLI version gracefully.
* Make python version property lazy
* Clarify .NET logic
* Add python test for validate_pulumi_version
* Add tests for invalid versions
* Fix python test
* Fix typo
* Fix tests
* Have _validate_pulumi_version handle parsing
* Modify python and .NET to parseAndValidate
* Modify typescript and go to parseAndValidate
* fix name
This change fixes a regression marshaling assets/archives that was introduced after adding support for marshaling output values.
For example, when setting an `Asset` on a field typed as `AssetOrAchiveInput`, in `marshalInput`, the input was being converted into an `AssetOrArchiveOutput` via the `ToAssetOrArchiveOutputWithContext`. Awaiting the output returns an `*asset` struct, which is itself an `AssetInput`, which causes infinite recursion when passed recursively to `marshalInput`.
The fix is to skip the `Input` checks in recursive calls, which is equivalent to the previous behavior before the regression was introduced.
Another issue was that when the input is converted to an output, this would result in `marshalInput` always returning an output value, even if the original passed-in value was not an output. To address this, if the output's value is known, not a secret, and has no dependencies, we can return the value itself rather than wrapping it as an output.
* Respect `plain` when generating default values.
* Add new test
* Simplify test case
* Add indirection to allow taking references
* Reflect indirection problem in tests
* Remove Plain fields. Base off of primitive type
* Reenable docs
* Update changelog
* Implement always default solution
* Fix test by pulling in master
* Add enum test and cleanup
* Fix const handling
* Clarify the changelog
* Fix race condition in TaskMonitoringHelper
Fixes#8163
TaskMonitoringHelper was using two seperate trackers for Idle and
FirstException and then calling WhenAny on both to see which state
happened first. This was racy as you could end up completing a task with
an exception but getting the idle tracker fire first, resulting in
TaskMonitoringHelper thinking no exception had happened.
I've combined the two trackers into TaskMonitoringHelper now. At each
task completion we check for exceptions and then idleness.
* Add changelog