Commit graph

6232 commits

Author SHA1 Message Date
Pat Gavlin ad18fe183e Bump the RTD Python version down to 3.6. 2021-08-25 15:23:46 -07:00
Emiliza Gutierrez f54e4a720f
Cleanup after v3.11.0 release (#7843) 2021-08-25 15:19:02 -07:00
Pat Gavlin 98f73cf1ed
Start in on developer documentation. (#7839)
Developer documentation is written in Markdown and can be built into
HTML, PDF, etc. using Sphinx. Diagrams are written in PlantUML and
rendered as SVGs. All developer docs live in the `developer-docs` folder
under the root of the repository.
2021-08-25 15:18:13 -07:00
Justin Van Patten 01f5289219
Prepare for v3.11.0 release (#7837) 2021-08-25 11:05:19 -07:00
Anton Tayanovskyy d6db21dd55
Avoid repeatedly invoking pip show in Python lang host (#7831)
* Avoid repeatedly invoking `pip show` in Python lang host

The Python language host invokes `pip show` for each Pulumi package in a
project at startup. But `pip show` is quite slow in large projects: it
takes 2+ seconds per invocation in a project at @MaterializeInc.

`pip show` is invoked to compute the installed location of each plugin
package. But it turns out `pip list` takes a `-v` flag that can supply
this information in one shot, avoiding the need to ever invoke `pip
show`.

This patch shaves about 20s off our boot time for `pulumi up`.

(There's probably a separate bug in Pip that causes `pip show` to be so
slow, because `pip list` is an order of magnitude faster and does a lot
more work, but I didn't bother tracking that down.)

* Test and fix issue with parsing non-JSON trailer returned by pip

* Fix issues found by Go lint

* CHANGELOG entry

Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>
2021-08-25 11:40:58 -04:00
Justin Van Patten 8112872b61
[sdk/dotnet] Support for calling methods (#7582) 2021-08-24 20:17:05 -07:00
Ian Wahbe bee803a970
Merge pull request #7824 from pulumi/iwahbe/7775/allow-hyphen-in-schema-path
Allow hyphen in schema path
2021-08-24 14:48:32 -07:00
Ian Wahbe 98d88f0899
Update CHANGELOG_PENDING.md
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-08-24 14:48:04 -07:00
Josh Studt 51b4f3d9bd
[auto/dotnet] - plugin installation options: exact version, server (#7796)
* add additional plugin install options

* update changelog

* slight re-name properties to be more idiomatic

* Apply suggestions from code review

Co-authored-by: Justin Van Patten <jvp@justinvp.com>

* Add support for old install plugin overload, and move unshipped api changes to shipped

* add breaking note to changelog

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-08-24 16:04:33 -04:00
Anton Tayanovskyy b667ce5d4f
Tighten up auto test (#7830)
* Tighten up a test to not fail for wrong reasons, use python helpers

* Use local in-source Python SDK for the test
2021-08-24 14:48:09 -04:00
Anton Tayanovskyy 1b67c9ee52
Satisfy Python lint: factor out URN parsing in Python and other fixes (#7821)
* Factor out URN parsing in Python

* More code sharing to satisfy lint dup code detector

* Fix lint R1735 recommendation of empty dict literal

* Fix lint issue insisting on known encoding during open()

* Fix parsing URNs without urn_name; test; exception wrapper
2021-08-24 09:57:51 -04:00
Ian Wahbe b30c57924a Move tests to correct location 2021-08-23 14:23:01 -07:00
Ian Wahbe cb5824593e Update changelog 2021-08-23 13:54:44 -07:00
Anton Tayanovskyy eef208633c
5758 for Go (#7784)
* Go support for 5758 - resurrect stale PR

* Fix listStorageAccountKeys test

* Check err so linter is satisfied

* Use all the examples

* Accept codegen results

* Regenerate with PULUMI_IGNORE_AMBIENT_PLUGINS=1

* Compile and test generated code as part of the test suite

* Add a CHANGELOG entry

* Remove temp test marker

* Shorten output type name

* Simplify code

* Add issue link

* Accept more codegen changes

* Use the suggested format for linking an issue
2021-08-23 16:46:09 -04:00
Ian Wahbe 9c02fe610f Allow hyphen in schema path
Fixes: https://github.com/pulumi/pulumi/issues/7775
2021-08-23 13:29:25 -07:00
Justin Van Patten ac2ba6aadd
Avoid missing go.sum entry for module for new Go projects (#7808)
Change `pulumi new` to use `go mod tidy` rather than `go mod download` when installing Go project dependencies, to ensure the project is fully prepared to be used by `pulumi up`, avoiding `missing go.sum entry for module` errors.
2021-08-23 07:54:56 -07:00
Roopak Venkatakrishnan da2bd2ab04
Update x/sys for sdk to support go 1.17 (#7781)
Co-authored-by: Levi Blackstone <levi@pulumi.com>
2021-08-19 17:11:26 -06:00
Anton Tayanovskyy 79931744b6
Fix order of go mod tidy (#7799) 2021-08-19 15:03:52 -04:00
stack72 d196fc0279 Cleanup after v3.10.3 release 2021-08-19 12:01:10 +03:00
stack72 d8ebde1590 Prepare for v3.10.3 release 2021-08-19 10:38:57 +03:00
Luke Hoban e0035a9cd2
Include transitive children in dependency list for deletes (#7788)
Fixes deletion order issues outlined in #7780 related to dependencies on multi language components not ensuring that all (transitive) children of the dependency are treated as dependencies.

Since the state file is not guaranteed to include all transitive dependencies explicitly specified (because dependencies on multi-langauge components will only include the dependency on the component itself, not all of it's transitive children), this PR enlightens the computation of dependencies for deletion ordering to expand the transitive dependency to include transitive children of direct dependencies.
2021-08-18 18:26:36 -07:00
Evan Boyle 68b4cd756d
stabilize go codegen for nested collection types (#7787) 2021-08-18 12:07:30 -07:00
Evan Boyle a0e402118f
[codegen/go] Fix generation of nested collection types and remove invalid args types (#7779) 2021-08-18 10:04:07 -07:00
Jan Češpivo e67334db1d
Added support for custom naming of dynamic provider resource (#7633)
Now there is not possible to change a name of dynamic provider resource without copying a code of the `pulumi.sdk.python.lib.pulumi.dynamic.dynamic.Resource` and changing the hard-coded name `"pulumi-python:dynamic:Resource"`. I successfully uses this proposal to make it possible.

Usage:
```python
class CustomResource(
    Resource, name="my-custom-provider:CustomResource"
):
   ...
```

Co-authored-by: Pat Gavlin <pgavlin@gmail.com>
2021-08-17 14:15:53 -07:00
Anton Tayanovskyy 2223c6b8b9
Fix null exceptions when reading unknown outputs (#7762)
* Fix null exceptions when reading unknown outputs

* Fix test compilation

* Add a test reproducing the actual problem

* Revert the change in behavior that was not clearny an improvement

* Unique resource UUID

* Add a CHANGELOG entry
2021-08-17 09:30:54 -04:00
T-Vova 065ae27b91
Fixed nil pointer error with BindExpressionText and typeExpr (#7766)
Co-authored-by: Vova Ivanov <jetvova@gmail.com>
2021-08-17 14:22:06 +03:00
Pat Gavlin d454e42b1d
Prepare for v3.10.2 (#7771) 2021-08-16 19:36:38 -05:00
Pat Gavlin 8f9a13a76f
[sdk/go] Fix a typo in marshaling. (#7768)
A few identically-typed variables got confused with the changes in #7737.
The confusion caused empty property values to be included in resources
that had any dependencies on other resources, which confused the
unmarshaling code for Go multi-language components. These changes fix
the typo and restore the original behavior, which is to omit empty
property values.

Co-authored-by: Emiliza Gutierrez <emiliza@pulumi.com>
2021-08-16 19:01:20 -05:00
Anton Tayanovskyy 4d4642c23d
Remove threading from mock tests to fix AIO waits on diff event loop (#7666)
* Remove threading from mock tests to fix AIO waits on diff event loop

* Add reference to the proper fix
2021-08-16 18:53:15 -04:00
PND b5ee840b16
[sdk/nodejs] Prevent Pulumi from overriding tsconfig.json options. (#7068) 2021-08-15 18:58:43 -07:00
Pat Gavlin e678b798fe
[backend/http] Better lease renewal diagnosability (#7761)
- Add context to the lease renewal failure error
- Spew to the -v=3 logs when lease renewal fails

Fixes #3055.
2021-08-13 15:14:07 -05:00
Anton Tayanovskyy 5069a8fca8
Fixes 5642 for Go: allow DependsOn accepting inputs and outputs (#7584)
* Work in progress, first passing tests

* Test unknown dep prop similar to Python

* Test fixes

* Fix lint

* Nit fix

* CHANGELOG

* Add ResourceInputArray and simplify the API

* Adopt urnSet
2021-08-13 11:13:23 -04:00
Anton Tayanovskyy cd885bded5
Re-introduce the fix for 7734 and mitigate CI hangs (#7746)
* Revert the revert

* Fix exception bleed from one test suite to another

* Fix typos
2021-08-13 11:07:13 -04:00
JasonWhall 93be963d6e
Stop printing value if it looks like a secret (#7327)
Stop printing secret value on `pulumi config set` if it thinks it may be a secret value. Instead, print the config key name.
2021-08-13 06:07:52 -07:00
Luke Hoban ebb0e6aaed
Allow Python dynamic provider resources to be constructed outside of __main__ (#7755)
The underlying library `dill` that we use for serializing dynamic providers into Pulumi state for Python dynamic providers serializes classes differently depending on whether they are in `__main__` or in another module.  We need the by-value serialization to be applied in all cases.

https://github.com/uqfoundation/dill/issues/424 is tracking adding the ability into `dill` to specify this by-value serialization explicitly, but until then, we will temporarily re-write the `__module__` of a provder class prior to serialization, so that `dill` behaves as we need for the dynamic provider use case.

Fixes #7453.
2021-08-12 20:02:17 -07:00
Justin Van Patten 1094d66659
Fix lint error (#7757) 2021-08-12 17:20:13 -07:00
Justin Van Patten 2b97340133
[codegen/docs] Emit docs for methods (#7731) 2021-08-12 14:31:15 -07:00
Emiliza Gutierrez 85c15b05e4
Cleanup from v3.10.1 release (#7753) 2021-08-12 12:32:12 -07:00
Emiliza Gutierrez 7b28a0a0cf
prepare for 3.10.1 release (#7751) 2021-08-12 09:16:27 -07:00
Pat Gavlin ecb98b66fd
[sdk/python] Transitive component dependencies. (#7732)
Implement Node/.NET-style dependency semantics for component resources.
Depending on a component implicitly depends on all of the component's
children. The exact set of children depends on exactly when the
component resource is observed.

Part of #7542.
2021-08-11 21:52:16 -05:00
Pat Gavlin 2d70324b56
[sdk/go] Transitive component dependencies. (#7737)
Implement Node/.NET-style dependency semantics for component resources.
Depending on a component implicitly depends on all of the component's
children. The exact set of children depends on exactly when the
component resource is observed.

Part of #7542.
2021-08-11 21:51:23 -05:00
Evan Boyle 7361e719dc
prepare for 3.10.0 release (#7748) 2021-08-11 18:44:32 -07:00
Anton Tayanovskyy ea333681ab
Revert "Fix hangs in core SDK when monitor unavailable (#7734)" (#7744)
This reverts commit e567b4762f.
2021-08-11 17:13:37 -04:00
Anton Tayanovskyy 453bbe478a
Workaround flaky TestLocalStateLocking 7710 (#7730)
* Allow one unexplained error

* Revert extreme settings
2021-08-11 16:50:03 -04:00
Justin Van Patten 0b782ea884
[sdk/python] Fix pulumi.property's default value handling (#7736)
We were incorrectly setting the name of the attribute rather than the intended default value.
2021-08-11 09:15:46 -07:00
Anton Tayanovskyy e567b4762f
Fix hangs in core SDK when monitor unavailable (#7734)
* Fix hangs in core SDK when monitor unavailable

* merged
2021-08-11 10:50:27 -04:00
Pat Gavlin 64696b42b8
[sdk/providers] Fix update previews (#7560)
Do not return the inputs as the state for update previews that use an
unconfigured provider. Returning the inputs as the state allows the
language SDKs to incorrectly treat unknown properties as known (because
we can't call `Update` on an unconfigured provider, we can't know which
properties are unknown). Users can re-enable the existing behavior by
setting the `PULUMI_LEGACY_PROVIDER_PREVIEW` environment variable to a
truthy value (e.g. `1`, `true`, etc.).

Most users will be unaffected by these changes. The most common programs
that may be affected are those that combine the creation of a managed
Kubernetes cluster with the deployment of applications to that cluster. These
programs generally need to configure a k8s provider instance by constructing
a kubeconfig from the output of the managed k8s cluster. Any changes to the
cluster that cause the kubeconfig to be unknown then cause the provider to
go unconfigured at runtime. Prior to these changes, resources managed by the
k8s provider would have some known outputs in this scenario, as the engine
would treat the resource's input values as its output values. After these changes,
the resource's outputs will be treated as unknown. The most frequent affect
that this has is that applies/stack outputs that depend on the outputs of
a k8s resource managed by a provider with an unknown kubeconfig will not
run/be displayed as `output`s during previews, respectively.

We might be able to improve on this by taking advantage of schema
information and filling in unknown values for properties that do not
exist in the inputs.

Fixes #7521.

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
Co-authored-by: Luke Hoban <luke@pulumi.com>
2021-08-10 19:44:15 -05:00
Horace Lee a92a005d68
Use ESlint instead of TSlint (#7719)
Migrated TSlint configs to ESlint ones using [tslint-to-eslint-config](https://github.com/typescript-eslint/tslint-to-eslint-config) tool, and refined the configs to better match the current coding style.

Changes:
- [member-delimiter-style](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/member-delimiter-style.md#options) that as suggested default for type definition to be  with `semicolon`
- Indentation fixes that is enforced by [eslint-indent](https://eslint.org/docs/rules/indent#options)
- Added dependencies for ESlint with Typescript
- Removed TSlint
2021-08-10 11:31:59 -07:00
Mikhail Shilkov 9c501b5bed
Fix Go generation for top-level module resources in a provider with a dash in name (#7692)
* Fix Go generation for top-level module resources in a provider with a dash

* Add tests
2021-08-10 08:58:24 +03:00
Komal 24802142f2
[programgen] - Fix a panic in property binding (#7718) 2021-08-09 14:24:08 +03:00