Commit graph

6197 commits

Author SHA1 Message Date
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
Evan Boyle
7b7f03ea55
free prepResource in finally (#7707) 2021-08-04 13:19:43 -07:00
Evan Boyle
f4153770eb
improve error message when flag passed to -s is not fully qualified (#7708) 2021-08-04 12:55:56 -07:00
Evan Boyle
8b918e544e
[sdk/nodejs] Account for outstanding async work done in prepareResource (#7704) 2021-08-04 10:27:38 -07:00
T-Vova
c0f0044a83
Update of CONTRIBUTING.md to reflect 3.0 changelog (#7698)
CONTRIBUTING.md updated to require NodeJS v12.x rather than v10.x, as Pulumi 3.0 no longer supports the latter.
2021-08-03 17:16:07 -07:00
Nikhil Benesch
442cdf5743
python: Use Sequence rather than List in Resource fields (#7700)
Similar to #5282, but for core SDK types. The tl;dr is that because
Sequence[T] is covariant, constructing resources becomes much more
ergonomic.

Fix #7693.
2021-08-03 14:03:42 -07:00
Pat Gavlin
594fca76d2
[codegen/go] Unify some output type generation (#7662)
These changes take a step towards simplifying and unifying the
generation of output types in the Go SDKs, especially for pointer,
array, and map outputs. This code was previously duplicated amongst the
various specialized output type generators, which led to inconsistencies
between the various implementaitons.

This is prep work for fixing #7595.
2021-08-02 13:43:24 -07:00
yarinm
013036064f
Add force flag for RemoveStack (#7523) 2021-08-02 12:54:46 -07:00
Vivek Lakshmanan
3b009c1266
Assertion fix in config key generation (#6902) 2021-08-02 12:22:09 -07:00
jetvova
ec5bafc3e2
Go install command is given proper DOTNET_VERSION (#7695) 2021-08-02 20:59:28 +03:00
svangordon-fruit
29fa23d6d9
Accept git remotes with periods in hostname (#7386)
Fix `cloudSourceControlSSHRegex` so that it will match git remotes with periods or hyphens in the hostname. However, `azureSourceControlSSHRegex` _does_ match hostnames with a period. As a result, `TryGetVCSInfo` will treat these sorts of remotes as Azure source control remotes and drop the first group. This causes updates to have an incorrect `"vcs.kind"` field. For example, an update with a Git remote of `github.foo.acme.com` will have a `"vcs.kind"` field of `foo.acme.com`. This occurs if a user is using a self-hosted GH enterprise instance.
2021-08-01 10:47:44 -07:00
Anton Tayanovskyy
ab7d4263b4
Fix IDE completion issues for lazy imports (#7487)
* Improve codegen import code completion python experience

* Accept codegen changes
2021-07-30 16:35:02 -04:00
Anton Tayanovskyy
13b6cc5eea
Fix reflecting list type annotations (#7681)
* Fix reflecting list type annotations

* Fix typo and add a test case

* Typo
2021-07-30 09:35:16 -04:00
Justin Van Patten
fe603568fd
Use provider.MainWithOptions to reduce boilerplate in integration tests (#7684)
We can use the new `provider.MainWithOptions` to reduce boilerplate in some of our testcomponent providers.

Also, while cleaning up here, I took this as an opportunity to replace use of `github.com/pkg/errors` in the `tests` dir to use the built-in functionality of the Go standard library.
2021-07-30 06:31:17 -07:00
Justin Van Patten
b2cf037bd4
Cleanup CHANGELOG_PENDING after a release (#7689) 2021-07-30 08:21:58 -04:00
Anton Tayanovskyy
669aa8a7ff
Fan out release workflow (#7687) 2021-07-29 20:38:56 -04:00
Justin Van Patten
994f60b319
Prepare for v3.9.1 release (#7686) 2021-07-29 16:54:34 -07:00
Anton Tayanovskyy
6724684172
Apply the same build tricks we run on PRs to master workflow (#7685) 2021-07-29 18:18:15 -04:00
Chris Smith
883bb76a69
Paginate backend list operations (#7600)
* Paginate backend::List*

* Update filestate backend

* Update httpstate backend

* Update pulumi CLI commands

* Rebase with 'master', fix merge conflict in CHANGELOG_PENDING.md

* Resolve merge conflicts / errors
2021-07-29 13:37:17 -07:00
Justin Van Patten
74ab9e0869
[sdk/python] Handle unknown results from methods (#7677)
This fixes handling of unknown results from methods in the Python SDK. Node.js and Go were already handling this appropriately.
2021-07-29 11:11:52 -07:00
James Nugent
11fc7e7f2b
Add provider.MainWithOptions helper function (#7598)
This commit adds a new counterpart to `ComponentMain` which accepts
an options struct for specifying callback functions. Currently it
supports `construct` (for components) and `call` (for methods), but is
extensible in a non-breaking fashion in future to support all other
provider methods as they become useful to implement.

The original `ComponentMain` still exists, though it may be desirable to
deprecate it in future in favor of `MainWithOptions`.
2021-07-29 10:31:09 -07:00
Justin Van Patten
88305ba896
Update test data for docs template change (#7678) 2021-07-29 10:15:03 -07:00
Anton Tayanovskyy
5788befcf4
Fixing WaitGroup related panics in the Go SDK (#7661)
* Add tests reproducing the panics

* Add v2 of the test

* Use tailor-made workGroup to mimic sync.WaitGroup

* Lint

* CHANGELOG
2021-07-29 12:39:28 -04:00
Pat Gavlin
1409d88438
[codegen/*] Add join and toBase64 functions. (#5012)
Co-authored-by: Komal Ali <komal@pulumi.com>
2021-07-28 20:41:23 -07:00
Anton Tayanovskyy
ba70b3fdba
Attempt to avoid triple-building projects in the solution (#7638) 2021-07-28 20:31:11 -04:00
David Wrede
878af7aecf
Updating doc links to align with changes in docs #4707 (#6157)
Co-authored-by: David Wrede <dave@pulumi.com>
2021-07-28 14:14:48 -07:00
Evan Boyle
f4efb7564b
Respect provider aliases (#7166) 2021-07-28 12:12:53 -07:00
Anton Tayanovskyy
5b2fdb27d3
Cleanup CHANGELOG_PENDING after a release (#7668) 2021-07-28 14:12:56 -04:00
Anton Tayanovskyy
0215a4fb51
Prepare for v3.9.0 release (#7667) 2021-07-28 14:10:05 -04:00
Anton Tayanovskyy
bc96ac799d
Inputty depends_on support for Python (#7559)
* Inputty depends_on support for Python

* Fix circular import

* Add a test, fix bugs found by test

* Fix typo

* Minimize loss of dep information in presence of unks to match Node behavior

* Add CHANGELOG entr

* Update sdk/python/lib/pulumi/output.py

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

* Update sdk/python/lib/test/test_resource.py

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

* Fix _is_prompt

* Enhance tests, found out a gap against Node impl

* Add non-listy case

* Internal functional combinators

* Do not use all/deep await when merging

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-07-28 09:49:07 -04:00
Komal
ae87b86e25
Include children when targeting components. (#7605) 2021-07-27 19:17:54 -07:00
Luke Hoban
fa6375999e
[backend/filestate] Allow pulumi stack ls to see all stacks regardless of passphrase (#7660)
* [backend/filestate] Allow `pulumi stack ls` to see all stacks regardless of passphrase

The information exposed via `pulumi stack ls` does not require being able to decrypt state files, but the existing logic for `pulumi stack ls` with the filestate backend was to fully decrypt the state file anyway, silently skipping any stacks that could not be decrypted.  This led to surprising results from `pulumi stack ls`.

After these changes, `pulumi stack ls` with the filestate backend will list *all* stacks that are available.  Notably, because there is no notion of "project" scoping in the fielstate backend (yet), `pulumi stack ls` will list all stacks independent of the project name.

Fixes #4798.
2021-07-27 18:37:25 -07:00
Komal
fddeea8a88
[codegen] Unify program codegen testing (#7657)
* ProgramGen test driver

* Refactor to avoid exporting hcl2 entities
2021-07-27 18:00:39 -07:00
Justin Van Patten
1141dd4c98
[codegen/dotnet] Emit resource methods (#7606) 2021-07-27 16:42:17 -07:00
James Nugent
4a035c44aa
Allow setting plugin name and version for Node.js (#7631)
This commit adds two new fields to the Node package info struct to
permit setting the plugin name if it differs from the package name, and
the version if it differs from the package version. This was already
supported by the loader.
2021-07-27 11:34:22 -07:00
Anton Tayanovskyy
148df112d7
Revert flag parse ordering change (#7640)
* Revert flag parse ordering change

* Add a simple unit test

* CHANGELOG
2021-07-27 12:42:52 -04:00