* .NET & python SDKs parity for bad pulumi versions
They handle invalid Pulumi CLI version gracefully.
* Make python version property lazy
* Clarify .NET logic
* Add python test for validate_pulumi_version
* Add tests for invalid versions
* Fix python test
* Fix typo
* Fix tests
* Have _validate_pulumi_version handle parsing
* Modify python and .NET to parseAndValidate
* Modify typescript and go to parseAndValidate
* fix name
* resolve issue with exit code not bubbling up and inflight tasks swallowing exceptions
* update changelog
* refacter to reduce and centralize inline program exception flow complexity
* quick comments on new pulumi function return type
Temporarily disable the new config secret warning to avoid unactionable warnings from provider `config` modules. We'll re-enable the warning when we've addressed that issue.
* 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
* 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>
* 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>
* 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>
* [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>
* 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>