Commit graph

225 commits

Author SHA1 Message Date
Josh Studt 31fec05a24
[auto/dotnet] - Add PulumiFn implementation for runtime stack type (#6910)
* add runtime stack type pulumi fn implementation

* add exception propagation test and update changelog

* slight refactor to just bring the identical service provider code into the new PulumiFn implementation.

* get tests passing, need service to be registered as transient so that the stack is instantiated each time because pulumi internal rely on instantiation

* check version command was failing because of additional white space it wasn't accounting for
2021-05-10 11:06:25 -04:00
Sean Fausett 92dd696dda Bump YamlDotNet to 11.1.1
https://github.com/aaubry/YamlDotNet/releases/tag/v11.1.1
2021-05-01 08:03:12 +12:00
Sean Fausett 276d3570ed Enable deterministic builds 2021-04-29 14:24:43 +12:00
Mikhail Shilkov 6100691262
Merge pull request #6905 from gitfool/gh6904
[automation/dotnet] Enable SourceLink with embedded PDB
2021-04-28 13:12:11 +02:00
Mikhail Shilkov d6477b1fc2
Merge pull request #6871 from gitfool/gh6870
[sdk/dotnet] Bump Grpc NuGet packages to 2.37.0
2021-04-28 11:49:26 +02:00
Sean Fausett 28a7e61daf Enable SourceLink with embedded PDB 2021-04-28 21:08:54 +12:00
Komal 1ed3445ed4
[automation/*] - Optionally skip Automation API version check (#6882)
Co-authored-by: James Nugent <jen20@apple.com>
2021-04-27 20:54:27 -07:00
Ville Penttinen daa6045381
[automation/*] Add support for getting stack outputs using Workspace (#6859) 2021-04-26 16:32:30 -07:00
Ville Penttinen 3cbfddf870
[automation/dotnet] Use stackName in ImportStack (#6858)
Co-authored-by: Komal <komal@pulumi.com>
2021-04-26 15:12:27 -07:00
Ville Penttinen 52fb4c2d68
[automation/dotnet] Fix EventLogWatcher failing to read events after an exception was thrown (#6821)
* [automation/dotnet] Fix EventLogWatcher failing to read events after exception

* Update CHANGELOG_PENDING.md

Co-authored-by: Anton Tayanovskyy <anton@pulumi.com>
2021-04-26 16:31:55 -04:00
Sean Fausett 44cc1684fc Bump Grpc NuGet packages to 2.37.0
https://github.com/grpc/grpc/releases/tag/v1.37.0
2021-04-25 16:57:17 +12:00
Komal 288d67d78b
[auto/*] - Bump min version (#6852) 2021-04-22 16:17:49 -07:00
Komal 61ce479241
Re-add [BREAKING] - Standardize stack select behavior (#6300) (#6840)
Co-authored-by: Paul Stack <public@paulstack.co.uk>
2021-04-22 14:10:39 +01:00
stack72 6279d7b009 Fixing up Pulumi logo in dotnet package 2021-04-21 18:45:21 +01:00
Mark Lambert 94d98b4e8a
[automation/dotnet] Use Grpc.AspNetCore.Server package - without Grpc.Tools dependency (#6793)
* Use Grpc.AspNetCore.Server package - without Grpc.Tools dependency

* Changelog message
2021-04-19 15:50:07 -04:00
Ismayil 4bafeee700
Fixes #6775: Duplicated Go modules (#6800) 2021-04-19 08:24:51 -07:00
stack72 9a8b17396d Ensuring the minimum version of the CLI is 3.0.0 for the Automation API in 3.0 release 2021-04-19 09:12:06 +01:00
Levi Blackstone f11e8603a2
[sdk/dotnet] Handle providers for RegisterResourceRequest (#6786)
Resolve providers references and include the resulting refs in the
providers field of RegisterResourceRequest that was added in
d297db3.

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-04-16 16:12:53 -06:00
Paul Stack 19bd08fb1c fixup linting errors after rebase of master -> feature-3.0 (#6766) 2021-04-14 19:32:18 +01:00
Paul Stack f6fea7fafb [cli] Removing the deprecated pulumi history command (#6724) 2021-04-14 19:32:18 +01:00
Paul Stack e955a6b06a Refactor Mock newResource and call to accept property bag rather than individual args (#6672) 2021-04-14 19:32:18 +01:00
Paul Stack 3dd3a2bc34 Remove Prefix suffix on Pulumi.automation Package (#6720) 2021-04-14 19:32:18 +01:00
pulumi-bot 73a66f48ea [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
pulumi-bot 3082ebe275 Ensuring that Pulumi automation api is minimum 3.0.0 CLI version 2021-04-14 19:32:18 +01:00
Anton Tayanovskyy 0e2d918587
stack.Cancel support in dotnet Automation API (#6729)
* First cut at Cancel

* Add a racecond-based test for Cancel

* Auto-gen xml updates

* Fix code formatting

* Add CHANGELOG entry
2021-04-13 14:09:33 -04:00
Lee Zen 49241d5f74
[dotnet] Fix serialization/deserialization for StackSettings (#6752) 2021-04-12 16:45:00 -07:00
Anton Tayanovskyy 737cffc147
dotnet automation api ImportStackAsync and ExportStackAsync (#6728)
* Initial impl of import/export

* Add test

* Address PR comments

* Do not Select stack but pass it as --stack

* Add CHANGELOG entry

* Update sdk/dotnet/Pulumi.Automation/LocalWorkspace.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/LocalWorkspace.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Add helper methods to match node SDK

* Match project settings

* Update CHANGELOG_PENDING.md

Co-authored-by: Komal <komal@pulumi.com>

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Co-authored-by: Komal <komal@pulumi.com>
2021-04-12 17:41:51 -04:00
Evan Boyle 3d5ede69af
Set main for default projects in Automation API (#6743) 2021-04-09 20:30:11 -07:00
Justin Van Patten f7cc19f89d
[sdk/nodejs] Keep prompt values prompt in construct (#6522)
In order to support prompt values in multi-lang components, if an input value is prompt, keep it as-is instead of wrapping it in an Output.
2021-04-09 14:36:22 -07:00
Josh Studt ef9a1e4e40
[sdk/dotnet] - Thread-safe concurrency-friendly global state (#6139)
* changes necessary for concurrent thread safe global deployment state

* update changelog

* backtrack resource package changes, enable test parallelization

* cleanup comment

* add copyright to new file

* resolve paralellization differences after merging automation api preview

* no longer need to null deployment instance

* Update CHANGELOG.md

* whoops - switch to CHANGELOG_PENDING

* Update CHANGELOG_PENDING.md

move note down to improvements

* attempt to exclude dynami assemblies

Co-authored-by: Anton Tayanovskyy <anton.tayanovskyy@gmail.com>
2021-04-09 15:55:34 -04:00
Anton Tayanovskyy e460ab7be5
Method renames for dotnet automation API GA (#6731)
* Method renames

* Add CHANGELOG_PENDING entry
2021-04-08 18:01:18 -04:00
Ville Penttinen d93e5acf67
[automation/dotnet] Expose WorkspaceStack.GetOutputsAsync (#6699) 2021-04-07 16:23:38 -07:00
Ville Penttinen 1f15c10b3d
[automation/dotnet] Fix GetConfigValueAsync failing to deserialize (#6698) 2021-04-06 14:10:30 -07:00
Anton Tayanovskyy 0b626126c0
Avoid scanning types from some assemblies (#6688) 2021-04-02 12:11:59 -04:00
Ville Penttinen c8fd984488
[automation/dotnet] Allow null environment variables (#6687)
* [automation/dotnet] Allow null environment variables

* Update CHANGELOG_PENDING.md

* Update sdk/dotnet/Pulumi.Automation.Tests/LocalPulumiCmdTests.cs
2021-04-02 10:08:43 -04:00
Anton Tayanovskyy 2c449fd70f
Simplify env var propagation (#6682)
* Simplify env var propagation

* Fix typo
2021-04-01 18:06:03 -04:00
Anton Tayanovskyy fc8262bad0
Avoid overriding dotnet proj settings accidentally (#6670)
* Add failing test

* Guard against overrding project settings accidentally

* Throw exception in case of conflct

* Update sdk/dotnet/Pulumi.Automation/DictionaryContentsComparer.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectRuntime.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectTemplateConfigValue.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectTemplate.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectRuntimeOptions.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectBackend.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/ProjectSettings.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Reduce nesting

* Make the new exception public

* Introduce a CHANGELOG entry since we add to pub API

* Stricter check before throwing

* Address PR feedback, round 1

* Use Reference.Equals check

* Move DictionaryContentsComparer out of top-level

Co-authored-by: Komal Ali <komal@pulumi.com>
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2021-04-01 15:27:24 -04:00
Komal 7f8985ab0f
Revert "Allow environment variables to have a null value (#6520)" (#6677)
This reverts commit 17d1ce509e.
2021-03-31 21:15:38 -07:00
Dan Friedman 17d1ce509e
Allow environment variables to have a null value (#6520) 2021-03-31 18:32:18 -07:00
Anton Tayanovskyy ce9ab05935
Use CliWrap for subprocess management (#6654)
* Use CliWrap for subprocess management

* Reintroduce .Stop(), fix compilation

* Sanitize command name.
2021-03-31 10:41:02 -04:00
Ville Penttinen 529fe8fc51
[automation/dotnet] Expose structured logging (#6572)
* [automation/dotnet] Start implementing structured event log support

* Add Events and their models

* Introduce new IStringToEnumConverter

This is intended to be used for converting a non-standard enum names
into corresponding enum values. The converter is utilized via
StringToEnumJsonConverter with OperationType and DiffKind.

* Add event-log support to up, refresh, destroy

* Update event-log tests

* Use lock instead of semaphore in EventLogWatcher

* Add ChangeSummary to PreviewResult

* Minor update

* Add doc comments to Events

* Use PropertyDiffModel in StepEventMetadataModel

* Set Events to public

* Set properties to public

* Fix PreludeEvent.Config doc comment

* Remove TODOs

* Update Pulumi.Automation.xml

* Set PULUMI_DEBUG_COMMANDs in Workspace.

* Split Events and their models to separate files

* Rename abbreviated Events

* Remove CancelEventModel

* Rename HandlesEvents test project and stack

* Update CHANGELOG_PENDING.md

* Rename abbreviated EngineEvent properties

* Implement custom exceptions

* Move event-log setup to LocalPulumiCmd

* Update comments

* Implement polling EventLogWatcher

This replaces the previous watcher which utilized FileSystemWatcher.

* Guard against onEvent throwing

* Dispose CancellationTokenSource

* WIP: try more direct error handling in EventLogWatcher

* A bit more tests

* Reformat

* Update sdk/dotnet/Pulumi.Automation.Tests/EventLogWatcherTests.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/Events/EventLogWatcher.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/Events/EventLogWatcher.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation.Tests/EventLogWatcherTests.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/Events/EventLogWatcher.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Update sdk/dotnet/Pulumi.Automation/Events/EventLogWatcher.cs

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>

* Make race condition workaround more explicit

* Untabify

* Remove unnecessary using and change String to string

* Update doc comments on Events

Co-authored-by: Anton Tayanovskyy <anton@pulumi.com>
Co-authored-by: Anton Tayanovskyy <anton.tayanovskyy@gmail.com>
2021-03-30 14:57:38 -04:00
Levi Blackstone 0a2452f1f5
[test] Randomize stack names for some .NET tests (#6637) 2021-03-29 13:08:41 -06:00
Komal 19c055315d
[automation/dotnet] - Implement min version checking (#6590) 2021-03-24 10:43:44 -07:00
Anton Tayanovskyy 980c50c602
Remove MaybeNull from Output/Input.Create to avoid spurious warnings (#6600)
* Remove MaybeNull attr from read-only params on Input/Output constructors

* Update changelog
2021-03-23 19:34:30 -04:00
Josh Studt 3ce5623270
[automation/dotnet] - Fix child process stream capture (#6586) 2021-03-19 19:16:32 -07:00
Komal dd53f58acb
[automation/dotnet] - Isolate project and stack names, defer stack removal for tests (#6584) 2021-03-19 13:23:13 -07:00
Anton Tayanovskyy 22f332e094
Fix docstring on node log.error and other SDK equivalents (#6573)
* Fix docstring of log.error across SDKs to explain non-termination

* Accept PR feedback, briefer docstrings.
2021-03-18 13:57:10 -04:00
Paul Stack 1d3c9edb6c
Ensure that make brew works as expected rather than passing empty version (#6566)
Fixes:#6565

As part of #6460, the logic for determing the version of the build was
moved to be a dependency on pulumictl.

Unfortunately, the homebrew installs use the "make dist" command to
build + install Pulumi to the user maching and as that would have a
dependency on pulumictl and it not existing on the user machine, it
would pass an empty version to the ldflag

This then manifested to the user as:

```
▶ pulumi version
warning: A new version of Pulumi is available. To upgrade from version '0.0.0' to '2.22.0', run
   $ brew upgrade pulumi
or visit https://pulumi.com/docs/reference/install/ for manual instructions and release notes.
```

We are able to mitigate this behaviour by bringing back the get-version
script and using that script as part of the make brew installation

We can see that the versions are the same between the 2 different
installation techniques

```
make dist <------- uses pulumict
DIST:
go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=2.24.0-alpha.1616029310+787eb70a" github.com/pulumi/pulumi/sdk/v2/dotnet/cmd/pulumi-language-dotnet
DIST:
BUILD:
```

```
make brew <----- uses the legacy script
▶ make brew
BREW:
go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=v2.24.0-alpha.1616029310+g787eb70a2" github.com/pulumi/pulumi/sdk/v2/dotnet/cmd/pulumi-language-dotnet
BREW:
```

A full post mortem will be carried out to ensure we mitigate these
types of errors going forward and that we are able to better test
these types of situations
2021-03-18 02:07:02 +00:00
pulumi-bot d0490979f7 Merge branch 'master' of github.com:pulumi/pulumi 2021-03-17 18:08:56 +00:00
Josh Studt 2c24efddaf
[sdk/dotnet] - bug fix, resolve deserialization of empty content response (#6560) 2021-03-17 18:08:46 +00:00
pulumi-bot 16a68cfd92 [build] Passing the correct version to the ldflag in the DotNet SDK 2021-03-17 17:57:18 +00:00
Ville Penttinen 66f5d50a50
[automation/dotnet,nodejs,python] Specify exec-kind for refresh & destroy (#6530)
dotnet, nodejs and python automation APIs did not specify exec-kind for
refresh or destroy operations. This is now added following the same
logic from the go automation API.
2021-03-16 14:24:32 -07:00
Ville Penttinen aa79630ee3
[automation/dotnet] Add ability to capture stderr (#6513) 2021-03-15 09:11:42 -07:00
Anton Tayanovskyy 5235e0818e
Merge pull request #6523 from pulumi/fix/invalid-json-test-data
JSON does not admit trailing commas
2021-03-12 18:02:59 -05:00
Komal 794bae5fd5
Skip breaking dotnet automation api test (#6521) 2021-03-12 13:33:16 -08:00
Anton Tayanovskyy 4de8dddb91 JSON does not admit trailing commas 2021-03-12 16:32:55 -05:00
Ville Penttinen c438cad689
[automation/dotnet] Add ReadDiscard OperationType (#6493)
Co-authored-by: Komal <komal@pulumi.com>
2021-03-12 10:10:56 -08:00
Paul Stack c48ba37fcf
Migrate the version calculation to use pulumictl (#6460) 2021-03-10 19:03:29 +00:00
Paul Stack 20e84dfe9e
Upgrading Go to 1.16.x (#6470) 2021-03-09 20:05:23 +00:00
Josh Studt c921c708e9
[sdk/dotnet] - automation api fix OnOutput (#6435) 2021-02-28 20:06:12 -08:00
Mike Chen 256e8284d0
[automation] - Add diff to up and preview in automation API (#6413)
Co-authored-by: Mike Chen <mikechen@ip-192-168-1-8.ec2.internal>
2021-02-23 17:38:28 -08:00
Komal 8b665f7131
[automation] - Remove summary from PreviewResult (#6405) 2021-02-23 17:07:16 -08:00
Komal 5f4e687a1d
[automation] - Consume config set-all and rm-all commands (#6388) 2021-02-19 22:59:18 -08:00
Mikhail Shilkov 9dbb5a979a Publish Pulumi.Automation as a preview NuGet 2021-02-19 12:09:04 +01:00
Joshua Studt 2f47060f83 resolve stack manipulation test issue by not making assertions about entire stack collection, plugin manipulation test as example 2021-02-18 12:52:48 -05:00
UnoSD c42d39a24f Support StackOptions in F# functions 2021-02-18 14:08:15 +01:00
Mikhail Shilkov 1ccfd7413e
Fix serialization tests of .NET Automation (#6375) 2021-02-18 14:03:27 +01:00
Josh Studt 963b5ab710
[Automation API] - C# Implementation (#5761)
* Init Workspace interface for C# Automation API

* fleshing out workspace interface and beginning of local workspace implementation

* initial run pulumi cmd implementation

* resolve issue with pulumi cmd cleanup wrapper task after testing

* flesh out local workspace implementation, flesh out stack implementation, cleanup run pulumi cmd implementation and make it an instance so it is mockable/testable, separate serialization in prep for custom converters

* project settings json serialization implemented

* Initial commit of language server

* Add deployment from language server

* Cleanup

* finish json serialization

* project runtime yaml serialization completed. just need stack config value yaml serialization

* Remove typed argument

* Limit concurrency

* Rename file for consistency

* final commit of a semi-working project settings & stack settings serialization so that it is in the commit history

* modify workspace API so that settings accessors aren't fully exposed since we are defering a complete serialization implementation until a later date

* yaml converters wrap any outgoing exceptions so resolve that

* getting the beginning of inline program GRPC communication set up

* stack lifecycle operations implemented, and switched to newtonsoft for JSON serialization

* change back to system.text.json with a custom object converter

* local workspace tests written, working on getting them passing

* fix the encoding on the GO files used for testing

* all tests passing except inline program, pulumi engine not available with inline

* inline program engine is now running as expecting, but inline program is not recognizing local stack config

* All tests passing, but no concurrency capability because of the singleton DeploymentInstance.

* cleanup unnecessary usings

* minor cleanup / changes after a quick review. Make sure ConfigureAwait is used where needed. Remove newtonsoft dependency from testing. Update workspace API to use existing PluginKind enum. Modify LanguageRuntimeService so that its semaphore operates process-wide.

* support for parallel execution of inline program, test included

* Update LocalWorkspaceTests.cs

remove some redundancy from the inline program parallel execution text

* flesh out some comments and make asynclocal instance readonly

* Strip out instance locking since it is no longer necessary with AsyncLocal wrapping the Deployment.Instance. Modify CreateRunner method such that we are ensuring there isn't a chance of delayed synchronous execution polluting the value of Deployment.Instance across calls to Deployment.RunAsync

* resolve conflicts with changes made to Deployment.TestAsync entrypoints

* update changelog

* write a test that fails if the CreateRunnerAndRunAsync method on Deployment is not marked async and fix test project data file ref

* make resource package state share the lifetime of the deployment so that their isn't cross deployment issues with resource packages, add support and tests for external resource packages (resource packages that aren't referenced by the executing assembly)

* enable parallel test collection execution in test suite, add some additional tests for deployment instance protection and ensuring that our first class stack exceptions are thrown when expected

* minor inline project name arg change, and re-add xunit json to build output (whoops)

* strip out concurrency changes since they are now in #6139, split automation into separate assembly, split automation tests into separate assembly

* add copyright to the top of each new file

* resolve some PR remarks

* inline program exception is now properly propagated to the caller on UpAsync and PreviewAsync

* modify PulumiFn to allow TStack and other delegate overloads without needing multiple first class delegates.

* whoops missing a copyright

* resolve getting TStack into IRunner so that outputs are registered correctly and so that there isn't 2 instances of Pulumi.Stack instantiated.

* resolve issue with propagation of TStack exceptions and add a test

* add support for a TStack PulumiFn resolved via IServiceProvider

* update automation API description

* fix comment and remove unnecessary TODOs

* disable packaging of automation api assembly

* re-name automation api documentation file appropriately

* add --limit support to dotnet automation api for stack history per #6257

* re-name XStack as WorkspaceStack

* replace --limit usage with --page-size and --page in dotnet automation api per #6292

Co-authored-by: evanboyle <evan@pulumi.com>
Co-authored-by: Josh Studt <josh.studt@figmarketing.com>
Co-authored-by: Dan Friedman <dan@thefriedmans.org>
Co-authored-by: David Ferretti <David.Ferretti@figmarketing.com>
Co-authored-by: Mikhail Shilkov <github@mikhail.io>
2021-02-18 11:36:21 +01:00
Justin Van Patten dab47e9b40
[sdk/dotnet] RegisterResourceOutputs: Check for resource ref support (#6172)
.NET's implementation of RegisterResourceOutputs was always serializing resources as resource references, regardless of the monitor's reported support. This change fixes .NET to check if the monitor supports resource references, which is consistent with all the other languages, and with serialization code elsewhere in the .NET SDK.
2021-01-21 17:04:21 -08:00
Pat Gavlin 683b4de2f0
Add .NET resource ref unit tests. (#6104)
- Add tests that serialize custom and component resources for targets
  that support resource references
- Add tests that serialize custom and component resources for downlevel
  targets
- Add tests that deserialize known custom and component resources
- Add tests that deserialize missing custom and component resources

These changes also fix a few bugs that were encountered during testing:
- Component resource construction was not supported
- Resources with missing packages could not be deserialized

In the latter case, a missing resource is deserialized as a generic
DependencyResource.

These changes also update the signature of IMocks.NewResourceAsync to
allow the returned ID to be null. This is technically a C# breaking change
with respect to nullability.

Contributes to #5943.

Co-authored-by: Mikhail Shilkov <github@mikhail.io>
2021-01-14 12:24:41 -08:00
Justin Van Patten 74580168c2
Fix looking up empty version in ResourcePackages.TryGetResourceType (#6084)
When a resource reference is deserialized, it may not have a version in which case `version` will be an empty string. This change fixes `TryGetResourceType` to work correctly when an empty version is passed.
2021-01-12 08:53:52 -08:00
Mikhail Shilkov 710f385447
[dotnet] Unsecret and IsSecret implementation for .NET (#6092) 2021-01-12 14:54:08 +00:00
Nicolas Fløysvik 9fbdc51fcd
[sdk/dotnet] Moved urn value retrieval into if statement (#6081) 2021-01-11 06:39:17 -08:00
stack72 9d0bac3e08 fixing the install of the DotNet SDK 2021-01-06 20:13:34 +00:00
Paul Stack ee776b3c33
Update PulumiStackType comments in dotnet and nodejs (#6028) 2020-12-30 23:02:18 +00:00
Paul Stack 77ea3fec70
Ensure only latest nuget packages are locally installed (#6027)
Fixes: #3882

This will clean the old packages as well as only "installing" the
latest built package
2020-12-30 21:57:34 +00:00
Mikhail Shilkov 356fe195af
Extensions to support input collection initializers with union types (#5938) 2020-12-14 20:33:53 +01: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
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
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
Sean Fausett 15941d58d9
Bump Grpc NuGet packages to 2.34.0 (#5862)
* Bump Grpc NuGet packages to 2.34.0

https://github.com/grpc/grpc/releases/tag/v1.34.0

* Remove redundant package reference

Transitive via project reference.
2020-12-04 16:58:18 +01:00
Nathan Winder 0bdf73341b
Enable creation of TStack using IServiceProvider (#5723)
* Enable creation of TStack using IServiceProvider to enable dependency injection.

* fixed line endings

* update change log

* Added PR link to change log

* fixed change log

* Added integration test

* Review adjustments

Co-authored-by: Mikhail Shilkov <github@mikhail.io>
2020-11-30 16:43:18 +01:00
Mikhail Shilkov ebb4ddb86a
Add support for getResource to the .NET SDK (#5817) 2020-11-23 20:55:03 +01:00
Pat Gavlin 807b09d6a6
Fix a few issues with resource references. (#5804)
- Differentiate between resource references that have no ID (i.e. because
  the referenced resource is not a CustomResource) and resource references
  that have IDs that are not known. This is necessary for proper
  backwards-compatible serialization of resource references.
- Fix the key that stores a resource reference's package version in the
  .NET, NodeJS, and Python SDKs.
- Ensure that the resource monitor's marshalling/unmarshalling  of inputs
  and outputs to/from calls to `Construct` retain resource references as
  appropriate.
- Fix serialization behavior for resources -> resource references in the
  Go SDK: if a resource's ID is unknown, it should still be serialized
  as a resource reference, albeit a reference with an unknown ID.
2020-11-23 11:15:10 -08:00
Tomas Jansson 89daaa2ff1
Output key and correct stack on keynotfound (#5740)
* Output key and correct stack on keynotfound

Co-authored-by: Mikhail Shilkov <github@mikhail.io>
2020-11-17 19:58:56 +01:00
Mikhail Shilkov b200e171a6
Update .NET Grpc to the latest and Protobuf to Pulumi fork (#5757) 2020-11-14 14:25:38 +01:00
Komal e9dbada593
[codegen/dotnet] - Enums (#5551) 2020-11-06 09:01:03 -08:00
Pat Gavlin 44376738f6
Add resource modules. (#5645)
This is necessary due to the way we've factored the libraries imported
by users into modules. The primary alternative is to ensure that each
child module imports the root module for a package and registers itself
with that package where necessary to prevent circular dependencies. This
simplifies the core SDKs slightly at the cost of greater complications
in the generated SDKs; the approach taken by these changes seems like a
more maintainable option.

Contributes to #2430.

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2020-11-04 10:24:41 -08:00
Komal 84d9947c6b
[sdk/dotnet] - Support enums (#5614)
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2020-10-30 13:08:32 -07:00
Mikhail Shilkov 5cef84f036
Read .NET plugin name from version.txt (#5629) 2020-10-28 15:53:29 +01:00
Pat Gavlin 3d2e31289a
Add support for serialized resource references. (#5041)
Resources are serialized as their URN, ID, and package version. Each
Pulumi package is expected to register itself with the SDK. The package
will be invoked to construct appropriate instances of rehydrated
resources. Packages are distinguished by their name and their version.

This is the foundation of cross-process resources.

Related to #2430.

Co-authored-by: Mikhail Shilkov <github@mikhail.io>
Co-authored-by: Luke Hoban <luke@pulumi.com>
Co-authored-by: Levi Blackstone <levi@pulumi.com>
2020-10-27 10:12:12 -07:00
Mikhail Shilkov 4f07891595
[dotnet] Add a lock around child resource manipulation (#5563)
[dotnet] Add a lock around child resource manipulation to prevent hashset concurrency issue

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2020-10-13 19:28:57 +02:00
Mikhail Shilkov 879066a60b
Execute self-contained .NET binary (#5519)
* Execute self-contained .NET binary
* Skip dotnet lookup for self-contained binaries
2020-10-07 11:46:24 +02:00
Justin Van Patten df75f0ed95
Support remote components in .NET (#5485) 2020-10-06 10:19:22 -07:00
Mikhail Shilkov 5e3c14c8be
[dotnet] Allow resources to define outputs of Output<object> (#5465) 2020-09-28 18:00:02 +02:00
Lee Briggs 95bc138b41
add master branch workflow (#5386) 2020-09-21 16:20:05 -07:00
Mikhail Shilkov f0386bec8d
Prevent concurrency issues when completing tasks (#5324)
* Prevent concurrency issues when completing tasks
2020-09-11 14:34:43 +02:00
Lee Briggs 0ac075ef8f
add initial pull-request workflow (#5276)
* add initial pull-request workflow

* run SDK test all

* add SDK tests

* fixup make targets

* add dist target

* revert back to 5 updates

* disable test

* add issue for test disabling
2020-09-09 13:37:03 -07:00
Sean Fausett a38bbaa221
Enable SourceLink with embedded PDB (#4967) 2020-07-21 16:55:08 +02:00
Mikhail Shilkov fe66a0ba6d
Speed up .NET programs with large number of resources (#5015)
* Speed up .NET programs with large number of resources
2020-07-21 10:50:14 +02:00