* 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 feature flag for go
* Add required+default test case
* Don't `<any>` cast known types.
* Add more flags.
I realize this should really wait for PR#8400 to merge.
* 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 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 `!`
* Start on `genPlainObjectDefaultFunc`
* Add missing change to fix test
* Run tests with merge
* Refactor out assign
* Merge in next _index.md diff
* Change method name to `Defaults`
* Handle enums correctly
* Another attempt at _index.md
* Make module generation deterministic
* Add checks for old values
* Insert defaults in resources
* Fix docs generation
Credit to @praneetloke
* Progress on adding defaults to Resource arguments
* Handle resource argument defaults
* Don't create defaults if disableObjectDefaults
* Rename test folder
* Add test for disable flag
* Fix disable test
* Update docs
* Abstract out nil comparisons
* Use reflection to test for empty values
* Simplify Ptr and pulumi.Any type handling
* Remove unused function
* Apply defaults to functions
* Update new test with master codegen
* Tests + nil check
These changes remove the `Ptr` variants of input/ouptut types for
resources. A `TPtr` input or output is normally generated for `T` if `T`
is present in an `optional(input(T))` or `optional(output(T))` and if
the Go representation for `T` is not nilable. The generation of `Ptr`
variants for resource types breaks the latter rule: the canonical
representation of a resource type named `Foo` is a pointer to a struct
type named `Foo` (i.e. `*Foo`). `Foo` itself is not a resource, as it
does not implement the Go `Resource` interface. Because this
representation already accommodates `nil` to indicate the lack of a
value, we need not generate `FooPtr{Input,Output}` types.
Besides being unnecessary, the implementation of `Ptr` types for
resources was incorrect. Rather than using `**Foo` as their element
type, these types use `*Foo`--identical to the element type used for
the normal input/output types. Furthermore, the generated code for
at least `FooOutput.ToFooPtrOutputWithContext` and `FooPtrOutput.Elem`
was incorrect, making these types virtually unusable in practice.
Finally, these `Ptr` types should never appear on input/output
properties in practice, as the logic we use to generate input and output
type references never generates them for `optional({input,output}(T)).
Instead, it generates references to the standard input/output types.
Though this is _technically_ a breaking change--it changes the set of
exported types for any package that defines resources--I believe that in
practice it will be invisible to users for the reasons stated above.
These types are not usable, and were never referenced.
This is preparatory work for #7943.
* 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.
We have seen cases where a lot of errors like this are reported:
```
UnboundLocalError: local variable 'resources' referenced before assignment
```
This change prevents this failure mode, which might be a symptom of some
other issue, but currently obscures it in the error path.
- [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