Commit graph

139 commits

Author SHA1 Message Date
Levi Blackstone
8cdac3e4ca
[cli] Strip Byte-order Mark (BOM) from YAML configs during load (#6636)
Some YAML parsers don't correctly handle Byte-order marks,
so automatically strip it off during load.

Related to #423

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-03-29 11:56:19 -06:00
stack72
f9579b0a92 Post v2.23.2 release cleanup 2021-03-25 19:01:45 +00:00
stack72
3f768221cd Prepare for v2.23.2 release 2021-03-25 17:31:34 +00:00
James Nugent
c1ce3da3e6
Make custom available to Mocks::newResource (#6551)
This commit adds a new optional parameter to the `newResource` function
of the `Mocks` interface for TypeScript. This can be useful when writing
tests which assert differing behavior between Custom and Component
resources.

Although the new parameter will always be set, the paramteter is marked
as optional in order to maintain backwards compatibility with existing
implementations of `Mocks`.

The tests are updated to verify that `custom` is set appropriately.

Co-authored-by: Luke Hoban <luke@pulumi.com>
2021-03-25 14:22:14 +11:00
Anton Tayanovskyy
4e5828a890
Avoid double-quailfying venv folder path (#6599)
* Avoid double-quailfying venv folder path

* Replace `path` with `filepath`

* Add a Python integration test to cover venv auto-creation

* Merged

* Fix spelling

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

* Make AbsPath and RelPath test variants

* Fix issue on Windows backslash paths

* Debug windows test failure: more logging and aggressive YAML escaping

* Use filepath.IsAbs instead of path.IsAbs

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-03-24 15:51:46 -04:00
Komal
19c055315d
[automation/dotnet] - Implement min version checking (#6590) 2021-03-24 10:43:44 -07:00
Levi Blackstone
7f42d42b2b
[automation/python] Fix Settings file save (#6605)
The Project and Stack save routines were erroneously
dumping the Python objects rather than the __dict__
property, which resulted in some extra annotations
in the resulting YAML files. Some parsers don't handle
these annotations correctly, and consider the resulting
YAML file to be invalid.
2021-03-23 19:26:34 -06: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
Komal
b187ce18c2
[automation/python] - Implement min version checking (#6589) 2021-03-23 08:35:11 -07:00
Komal
768db3e067
[automation/nodejs] - Implement min version checking (#6580) 2021-03-22 23:04:36 -07:00
Komal
2fde29642d
[automation/go] - Implement min version checking (#6577) 2021-03-22 23:04:14 -07:00
Levi Blackstone
a2f995d2bb
[sdk/go] Cache loaded configuration files (#6576)
* [sdk/go] Cache loaded configuration files

Previously, the CLI did not cache configuration files, which
required a read from disk + unmarshalling + validation each
time a consumer needed to read one of these configurations.
This change introduces global caches for each type of Pulumi
configuration file (Project, ProjectStack, PolicyPackProject, and
PluginProject). The configuration is cached after the first request
and the cached value will be used for any subsequent operations.

Important note: The global configurations are not concurrency safe,
but this same problem exists using the previous method of
reading/writing config files on disk. Synchronization
will be added in a follow up change to allow for concurrency safe config
operations.
2021-03-19 10:52:12 -06:00
Luke Hoban
b82b850af0
Fix pulumi refresh diffs (#6568) 2021-03-19 13:11:59 +11:00
pulumi-bot
43ac8f5233 Post v2.23.1 release cleanup 2021-03-18 15:45:26 +00:00
pulumi-bot
7a88812857 Prepare for v2.23.1 release 2021-03-18 02:08:15 +00:00
pulumi-bot
7977f1d160 Post v2.23.0 release cleanup 2021-03-17 19:23:39 +00:00
Justin Van Patten
8c0a5e79b6
[sdk/go] Implement getResource in the mock monitor (#5923) 2021-03-16 16:59:02 -07:00
Luke Hoban
6e0106265e
Fix up CHANGELOG (#6535) 2021-03-16 14:33:21 +11:00
Ville Penttinen
aa79630ee3
[automation/dotnet] Add ability to capture stderr (#6513) 2021-03-15 09:11:42 -07:00
Paul Stack
59686ab3ad
Ensure a user has access to the secret manager before trying to decrypt checkpoint (#6215) 2021-03-15 14:17:43 +00: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
Komal
f5dc226a3c
[automation/nodejs] - Fix missing OpTypes and PreviewOptions (#6507) 2021-03-11 16:23:44 -08:00
Paul Stack
de5d989d8a
Move automation/go breaking changelog entry to breaking section (#6508) 2021-03-11 21:59:06 +00:00
Paul Stack
975100df6c
Add support when GOPATH has multiple folders (#6506)
Co-authored-by: Youn Den <dendaneys@gmail.com>
2021-03-11 21:11:32 +00:00
Komal
1fc2ba48e2
[automation/nodejs] - Expose structured logging (#6454)
Co-authored-by: Luke Hoban <luke@pulumi.com>
2021-03-11 11:45:28 -08:00
Komal
10d99b8afb
[automation/go] - Expose structured logging (#6436) 2021-03-10 20:49:48 -08:00
Paul Stack
63857ac72d
Disabling the use of pulumi watch on darwin/arm64 architecture (#6497) 2021-03-10 22:03:55 +00:00
Paul Stack
dc7eb5e2d2
[cli] Add ability to consume arm64 plugins from pulumi cli (#6492)
Related: #4868

Also adds the arm64 build and deployment steps via goreleaser
2021-03-10 16:28:55 +00:00
Justin Van Patten
0b1414dc6d
[sdk/python] Fix mocks issue when passing a resource more than once (#6479)
This change avoids `RuntimeError: There is no current event loop in thread '<thread_name>'` errors when passing a resource as an input multiple times when using mocks.

The problem is that when using mocks, we deserialize the gRPC inputs before passing them to the user's mock methods. Deserializing inputs doesn't typically require an event loop, however, during deserialization of resource references, we end up creating some instances of `Future`, which does require an event loop to be present for the current thread. If this is done multiple times for a resource, it's possible that `deserialize_properties` will be called on an asyncio thread that doesn't yet have an event loop, resulting in the error being raised.

The error does not occur when only passing the resource reference once because typically the thread (e.g. `asyncio_0`) used in that case will have already had an event loop created for it due to the use of the internal `_syncawait` when _serializing_ the source resource's properties, which ensures an event loop is set for the thread.

The fix is to ensure an event loop is created for the thread in the mocks implementation before calling `deserialize_properties`.
2021-03-09 13:48:24 -08:00
Paul Stack
20e84dfe9e
Upgrading Go to 1.16.x (#6470) 2021-03-09 20:05:23 +00:00
Luke Hoban
0ad6f9b63b
[sdk/go] Add To methods to convert array and map values to Inputs (#6337) 2021-03-05 19:43:33 +11:00
pulumi-bot
a6501fe26e Cleanup after v2.22.0 release 2021-03-03 19:48:57 +00:00
pulumi-bot
011fa0577e Prepare for v2.22.0 release 2021-03-03 18:45:26 +00:00
Josh Studt
c921c708e9
[sdk/dotnet] - automation api fix OnOutput (#6435) 2021-02-28 20:06:12 -08:00
jakzo
e78dea4979
serialize default parameters (#6397) 2021-02-25 21:21:10 -08:00
Komal
24e07ab507
[automation/python] - Use TemporaryFile and seek() (#6421) 2021-02-24 17:21:24 -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
Paul Stack
aab9cb5e42
Changing the process for CHANGELOG entries (#6408)
As part of our continued effort to make our releases more useful,
we will be adding our CHANGELOG entries to the GitHub Release.

To make this process smooth, we are going to change things a little:

1. All new changelog entries when submitting a PR for an upcoming
release will now need to get added to CHANGELOG_PENDING.md
This is the source of information for what will be delivered in the
release.

2. When a release is being made, the entries from CHANGELOG_PENDING
will be copied to a new version and dated section in CHANGLOG to
mark the release

3. The GH tags will continue as normal and Goreleaser will copy
the changelog entries to the release section in GH
2021-02-23 19:59:59 +00:00