Commit graph

5423 commits

Author SHA1 Message Date
Levi Blackstone 1c87d58b4a
Fix bug with ComponentResource resource refs (#5949)
Now that resources are serialized as refs, ComponentResources
may try to unmarshal local resource refs before they are
initialized during the RegisterResource step.

This change avoids that issue by skipping Output marshaling
for local ComponentResources during the RegisterResource step.
These Outputs will be handled instead during the
RegisterResourceOutputs step.

Co-authored-by: Pat Gavlin <pat@pulumi.com>
2020-12-18 14:45:52 -07:00
Pat Gavlin 860ea4dc84
Add ignoreChanges preprocessing in ImportStep. (#5976)
The step generator applies `ignoreChanges` pre-processing for all
resources by copying old input values to the new goal for any properties
mentioned in the `ignoreChanges` list. However, this pre-processing
depends on the existence of prior inputs, which by definition does not
exist for a resource being imported prior to the issuance of the
`ImportStep`. These changes add this processing to the implementation of
`ImportStep`, using the inputs read from the provider as the prior
inputs.
2020-12-17 14:46:50 -08:00
Pat Gavlin 8e278ca9d3
Improve Python serialization test harness. (#5977)
- Reset the runtime prior to each test
- Use the SDK's `test` decorator instead of `async_test`
- Rename a couple classes to avoid warnings from pytest
2020-12-17 14:45:18 -08:00
Pat Gavlin 05a922b431
Add NodeJS resource ref unit tests. (#5969)
These tests cover the same scenarios that are coverted in the engine's
unit tests, but exercise the Node SDK's marshalling paths.

These changes include a few enhancements to the Node SDK's test APIs
that make it easier to more precisely control its behavior, and extend
the `Mocks` interface to allow the registration of component resources
to work properly.

Contributes to #5943.
2020-12-17 10:49:22 -08:00
Komal b0756cb703
Improve meta tags on documentation (#5968) 2020-12-17 10:44:57 -08:00
jon 30088d34c5
fixes lint checkout target for prs (#5971) 2020-12-16 21:15:06 -08:00
Komal 31cd0934bd
Fix linting. (#5967) 2020-12-16 16:00:59 -08:00
Evan Boyle 268abea53b
bump nodejs test timeout for automation api (#5966) 2020-12-16 12:47:15 -08:00
Lee Briggs de87d3cd88
make import command help a little clearer (#5965) 2020-12-16 12:45:11 -08:00
Pat Gavlin 9b6a7a4397
Improve resource ref unit tests. (#5960)
- Add component ref coverage to the existing test
- Add coverage for a downlevel SDK communicating with an engine that
  supports resource refs
- Add coverage for a downlevel engine communicating with an SDK that
  supports resource refs

As part of improving coverage, these changes add a knob to explicitly
disable resource refs in the engine without the use of the environment
variable. The environment variable is now only read by the CLI, and has
been restored to its prior polarity (i.e. `PULUMI_ENABLE_RESOURCE_REFERENCES`).
2020-12-16 12:38:20 -08:00
Komal 9b33dd84d5
[codegen/*] - Fix enum names that start with an underscore. (#5950) 2020-12-16 09:22:44 -08:00
Komal 807e7a051e
[codegen/dotnet] - Fix enum naming for k8s (#5956) 2020-12-16 08:58:42 -08:00
Komal a75f63edb5
Fix linting. (#5954) 2020-12-15 17:56:42 -08:00
Pat Gavlin 20743f7be3
Split engine unit tests into individual files. (#5951)
Each file covers a particular feature. These changes are intended to
make the tests easier to navigate.
2020-12-15 14:24:46 -08:00
Komal cae129c7fa
[codegen/*] - Align makeValidIdentifier between languages (#5944) 2020-12-15 12:41:27 -08:00
Komal 791ccc58d4
[codegen/docs] - Remove primitive type links (#5911) 2020-12-14 19:56:45 -08:00
Komal 95c09d88c8
[codegen/docs] - Add enums to docs (#5912) 2020-12-14 14:40:14 -08:00
Mikhail Shilkov 356fe195af
Extensions to support input collection initializers with union types (#5938) 2020-12-14 20:33:53 +01:00
Luke Hoban 8f9054f56c Prepare for v2.15.6 release 2020-12-12 13:04:38 -08:00
Levi Blackstone 54d6703fee
Temporarily disable resource ref support (#5932)
Disable resource ref support until https://github.com/pulumi/pulumi-kubernetes/issues/1405
is fixed. This bug currently affects Python users with recent versions of the pulumi SDK
who are using the pulumi-kubernetes provider.
2020-12-12 12:02:45 -08:00
Evan Boyle 069f9f28cf
Fix bug that could cause Go SDK to drop dependencies (#5930)
* fix bug that could cause Go SDK to drop dependencies

* changelog
2020-12-11 16:27:11 -08:00
Komal fed47e7334
[codegen/docs] - Fix html for property types (#5929) 2020-12-11 12:01:50 -08:00
Levi Blackstone d3c75afce1
[codegen/go] Fix Input/Output methods for Go resources (#5916) 2020-12-11 11:49:08 -07:00
stack72 93e621aef6 Prepare for v2.15.5 release 2020-12-11 11:49:50 +00:00
Justin Van Patten 160220bc4a
[sdk/dotnet] Fix deserializing resources (#5921)
This change implements getResource in the mock monitor. This uncovered some issues deserializing resources, which this change also addresses.
2020-12-10 22:58:08 -08:00
Justin Van Patten afd5ad6a97
[sdk/python] Implement getResource in the mock monitor (#5919) 2020-12-10 15:23:00 -08:00
Levi Blackstone 1674e0c0e4
Fix lint issue 2020-12-10 13:18:27 -07:00
Pat Gavlin 43c2507058
Allow display output to be explicitly redirected. (#5887)
This is intended to make it easier to write tests for components (e.g.
the backends) that consume these packages.
2020-12-10 11:39:01 -08:00
Levi Blackstone f8382a57f4
Improve marshaling error message (#5915) 2020-12-10 12:11:54 -07:00
Levi Blackstone 4d48ee0517
Enable resource reference feature by default (#5905)
* Enable resource reference feature by default

Unless the PULUMI_DISABLE_RESOURCE_REFERENCES flag
is explicitly set to a truthy value, the resource reference feature is now
enabled by default.

* Set AcceptResources in the language SDKs

This can be disabled by setting the `PULUMI_DISABLE_RESOURCE_REFERENCES` environment variable to a truthy value.

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2020-12-10 11:21:05 -07:00
Justin Van Patten 918615f072
[sdk/nodejs] Implement getResource in the mock monitor (#5914)
Otherwise, unit tests for programs that reference resources that have been registered with `registerResourceModule` fail with unhandled exceptions.
2020-12-10 09:30:34 -08:00
Justin Van Patten 4747be7b9f
[sdk/nodejs] Use log.error to log uncaught errors (#5910)
`log.error` will call the engine's `log` gRPC endpoint (if the engine is available; otherwise it will write to `console.error`) with `LogSeverity.ERROR`, which tell the engine to stop processing further resource operations.

Without this, any uncaught errors (such as input validation errors done inside `apply`) would be written to stderr, but wouldn't actually result in an update error.
2020-12-10 08:53:25 -08:00
Paul Stack 3994fa8c22
Prevent panic when using pulumi import with local backend (#5906)
Fixes: #5876
2020-12-10 13:31:45 +00:00
Komal cba68b0874
Fix union types in resource docs (#5909) 2020-12-09 18:18:34 -08:00
Mikhail Shilkov cab39dcfa0
[dotnet] Resource package registration in .NET (attributes) (#5875)
* Resource package registration in .NET
* Refactor to attribute-based discovery
* Refactor to derived attributes
2020-12-09 23:28:58 +01:00
Komal 193b1f7d3b
Remove optional identifier before splitting type string. (#5907) 2020-12-09 12:20:11 -08:00
Pat Gavlin a193836682
Fix new resource recording. (#5897)
Record new resources after their operations have been run rather than
before in order to ensure that all state is available and appropriately
marked as secret.

Fixes #5803.
2020-12-08 19:21:58 -08:00
Luke Hoban b45b3ed543
Re-apply #5857 (#5893)
This re-applies the fix in 5857 to make credentials.json writes concurrency safe.

The original fix used `path.Dir` instead of `filepath.Dir` - which led to not placing the temp file in the same folder (and drive) as the renamed file target.  This led to errors on Windows environments where the working directory was on a different drive than the `~/.pulumi` directory.  The change to use `filepath.Dir` instead ensures that even on Windows, the true directory containing the credentials file is used for the temp file as well.

Fixes #3877.
2020-12-08 17:38:59 -08:00
Komal 62abd821e9
Update run-docs-gen to use v3 of create-pull-request (#5899) 2020-12-08 15:30:05 -08:00
Komal 999c6fbd33
[codegen/docs] - Improve resource doc titles (#5894) 2020-12-08 15:04:36 -08:00
Aylei faebaa0dc5
[ciutil] Correct system name of Jenkins CI (#5891)
Signed-off-by: Aylei <rayingecho@gmail.com>
2020-12-08 18:36:31 +00:00
stack72 d804b7d99c Prepare for v2.15.4 release 2020-12-08 14:32:15 +00:00
stack72 4c4a4733e8 Fixing up the go deps as this was breaking the publish step 2020-12-08 14:30:21 +00:00
stack72 7393f80b43 DEBUG when trying to understand why master sdks are classed as dirty for dev builds 2020-12-08 13:20:46 +00:00
Paul Stack 4f5b3c8522
Ensure we have an import error before using in import path (#5884)
Without this, we can panic
2020-12-08 00:43:35 +00:00
Vivek Lakshmanan f81a4d28a5
Merge pull request #5886 from pulumi/vl/WindowsBuild
Fix windows publish
2020-12-07 16:05:45 -08:00
Vivek Lakshmanan 3ec7dbeded Fix windows build 2020-12-07 15:58:30 -08:00
Vivek Lakshmanan aba03b8594
Merge pull request #5874 from pulumi/vl/Windows
Shim python interpreter for windows if interpreter uses reparse points
2020-12-07 15:13:21 -08:00
Vivek Lakshmanan 4e144e666c Add changelog entry 2020-12-07 14:17:45 -08:00
Vivek Lakshmanan 3ea87776a0 Add copyright notice 2020-12-07 14:17:45 -08:00