* Allow specifying a branch with url#branch
* Probe for master and main
* Update CHANGELOG
* Fix linter errors
* Remove unnecessary feature
* Fix lint
* Update changelog to reflect new limited scope.
We only talk about the master -> main probing, because that is all the
PR does. It used to duplicate another feature.
* Modify Go codegen for fn.Output overloads
* Fix go tests
* Fixed CHANGELOG conflict
* ACCEPT changes reverting Fargate example to master, file issue
* Link an issue
* Add test case
* Fix tests
* Add test dependencies correctly
* Feed through error handling
* Include test output
* Get types to line up
* Add remaining test files
* Update changelog
* Correctly find type paths
* Handle transitive objects
* Handle required fields
* Add required+default test case
* Don't `<any>` cast known types.
* Add plain object to env-helper test
This test fails right now. My next problem is fixing it.
* Handle plain types
* Handle function inputs
* Fix the indentation
* Handle output types correctly
* Remove unnecessary `!`
* Add missing change to fix test
* Run tests with merge
* Merge in next _index.md diff
* Another attempt at _index.md
* Make module generation deterministic
* Fix docs generation
Credit to @praneetloke
* Teach PCL about fnOutput forms
* Teach PCL about fnOutput forms
* Teach Node program gen to emit fnOutput forms
* TypeCheck fix
* AWS package bump
* Add tests
* CHANGELOG
* Temporarily skip non-Node affected tests
* Address PR feedback: restrict new form to Output args only
* Update command respects `--target-dependents`
* Update CHANGELOG_PENDING.md
* Depend on parent and provider
* Add tests for new feature
* Separate predicate and mutation in code
* Remove `targetDependentsForUpdate`
* Refactor `isTargetedForUpdate`
* Add very important nil check
And update the metaschema to accommodate the `isOverlay` properties
added in #8338. Overlay enums, like other overlay members, are
implemented out-of-band by the declaring package. Code generators should
not generate declarations for overlay enums.
- [sdk/nodejs] - Allow returning failures from Call in the provider without setting result outputs.
- [sdk/go] - Allow specifying Call failures from the provider.
- Add tests that return failures from Call.
* Implement the --exclude-protected feature
This piggybacks on the same machinery used by the --target flag. By
examining the stack, we find a list of all resources managed by
Pulumi (in that stack). We then form them into a DAG, and mark all
resources as either protected or unprotected.
A resource is protected it has the `Protect` flag set or is has a child
with the `protect` flag set. It is unprotected otherwise.
We then pass the urns of unprotected resources to the update options
passed to the destroy operation in the same way that `--target` does.
* Update changelog
* Handle providers correctly
* Add integration test
* Protect dependencies of protected resources
* Handle --exclude-protected in separate function
* Simplify implementation via DependencyGraph
* Add TransitiveDependenciesOf
* Cleanup unused functions
* Gate printed message behind !jsonDisplay
* Ensure provider is not `""`
* Clean up documentation (and some code)
* Added a buildkite detector for detecting the correct env vars in CI
* adding pending changelog entry
* fixed PR logic to actually match the Buildkite Docs and simplified if statement, Fixed a few typos in comments and added PR to CHANGELOG_PENDING.md
* made PR number fetch easier to read
* fixing typo in comment
* Fix issue with --target deletion dependant calculation
The code that computed --target deletion dependants was not correct.
It used parent/child component relationships, but did not respect actual
DAG dependencies. As a result, it could erroneously leave hanging
references to resources that no longer exist after performing a
`pulumi destroy --target X` operation. This manifested in bugs like
https://github.com/pulumi/pulumi/issues/6283, which is fixed by this
change. The solution is to compute the (transitive!) dependency graph
correctly, factoring in both parent/child, as well as explicit and
implicit, dependencies. The existing logic does the correct thing once
we do this. I've also added tests for this area, including regression
tests that cover transitive dependency relationships, as well as ones
that would cause an infinite loop given a naive implementation.
* Add a changelog entry
* Fix failing test to include all destroyed targets
Unless I'm missing something, the entire tree should be deleted
in this test case because A is the ancestor for the entire tree.
* Use DependencyGraph to compute dependents
Per code review feedback from @pgavlin.
Co-authored-by: Anton Tayanovskyy <anton@pulumi.com>
Add a new `IsOverlay` option to schema types and functions that allows providers to document overlays in the schema. This makes it easier to generate API docs consistently, even for code that is generated outside of the typical codegen process.
* 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
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.
* 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)`.
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
* Rebase 5758 .NET work and make output-funcs pass
* Propagate changes to the other examples
* CHANGELOG
* Address PR feedback
* Add a test reproducing aws-native compilation failure
* Fix dangling type ref issue in the .NET backend for codegen
* Accept changes and unskip simple-methods-schema compile check
* Accept changes in node, python, go codegen
* SDK changes to enable a better implementation approach
* Switch approach to support functions like GetAmiIds; avoid name conflicts under tfbridge20
* Make all dotnet tests pass, mechanical fixes + accept test output
* Accept python changes
* Accept node output
* Accept docs changes
* Deepen the unit test to cover the interesting helper type
* Accept go changes and fixup tests
* Implement dep propagation through Invoke
* Fixup cyclic-types
* Accept codegen
* NOTE we now require .NET SDK 3.15 or higher
Register an appropriate input type with the runtime for each object
type and composite thereof (e.g. pointer, array, etc.). This does not
cover registrations for enum and resource input types, which will be
added with future changes.
Co-authored-by: Pat Gavlin <pat@pulumi.com>