Commit graph

554 commits

Author SHA1 Message Date
Praneet Loke 2c25c3fbd0
[backend/filestate] Don't unwrap go-cloud errors (#8455)
* Don't unwrap go-cloud errors

* Remove unused func

* Add changelog entry

Co-authored-by: Ian Wahbe <ian@wahbe.com>
2021-11-19 12:21:37 -08:00
Ian Wahbe 272c4643b2
Update error handling (#8406)
This is the result of a change applied via `go-rewrap-errors`.
2021-11-12 18:37:17 -08:00
Paul Stack 74ba28ad55
[CLI] Adding the ability to create a default org for backends that support orgs (#8352) 2021-11-12 20:44:51 +02:00
Komal 2f433d64b7
[cli] Emit JSON events for updates via --json flag (#8275) 2021-10-26 16:21:27 -07:00
Ian Wahbe 9df8d3a028
Bold in-progress diffs diffrently (#7918)
* Initial take on coloring in-progress diffs

* Update CHANGELOG_PENDING.md

* Add high and low color levels

* Don't print functions

* Change colorprogress to bold

* Fix @komalali's nits.

* Restore background colors comment
2021-09-28 15:16:09 -07:00
Komal 3d42198991
Clean up diagnostic messages in event log (#7998)
* Don't escape characters in event log.

* Respect NO_COLOR
2021-09-21 17:22:39 -07:00
Komal c7dbf4ad15
Rename PermaLink to Permalink (#7999) 2021-09-20 09:42:29 -07:00
Anton Tayanovskyy 27b1404d9e
Fix lint (#7915)
* Fix lint

* Fix lint of pkg folder
2021-09-07 16:41:17 -04:00
Pat Gavlin e678b798fe
[backend/http] Better lease renewal diagnosability (#7761)
- Add context to the lease renewal failure error
- Spew to the -v=3 logs when lease renewal fails

Fixes #3055.
2021-08-13 15:14:07 -05: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
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
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
Emiliza Gutierrez 55ed50f87a
Normalize cloud URL during login (#7544) 2021-07-16 09:45:57 -07:00
Komal a41ed75942
Fix watch command in macos arm64 builds (#7345) 2021-06-21 14:33:30 -07:00
Adrian Smijulj 98211718ad
Watch Command - Added --path Argument (#7247) 2021-06-21 17:34:21 +10:00
Luke Hoban c5907962d6
Render logs consistently in watch and logs (#7235)
We were trimming trailing newlines from log messages in `pulumi logs` but not in `pulumi watch`.  The latter was seeing many empty lines in logs as a result of this.  This change consistently trims trailing newlines in all log rendering.
2021-06-08 11:20:59 +10:00
Praneet Loke dbea8058a2
Bump the Pulumi Service API version header to 7 (#7193)
* Version 7 indicates to the Pulumi Service that the CLI supports setting required headers for policy pack publishing

* Add bumping the Pulumi Service API version to the PR checklist
2021-06-02 11:32:52 -07:00
Evan Boyle 6ae6cc45b7
skip installing dev dependencies for nodejs plugin setup (#7188) 2021-06-02 11:09:03 -07:00
Praneet Loke 734db8368e
Support using pre-signed URLs for Azure Storage issued by the Pulumi Service (#7137)
Add RequiredHeaders attribute to the CreatePolicyPackResponse
2021-05-27 21:45:35 -07:00
Evan Boyle c3dc2d54ab
Add user agent to the CLI, Go and Nodejs Automation API SDKs (#6935) 2021-04-30 07:26:23 -07: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
Luke Hoban b82b850af0
Fix pulumi refresh diffs (#6568) 2021-03-19 13:11:59 +11:00
Kraig Amador 71ec66aa45
Support locking on filestate logins (#2697)
When using the filestate backend (local files and cloud buckets) there is no protection to prevent two processes from managing the same stack simultaneously.

This PR creates a locks directory in the management directory that stores lock files for a stack. Each backend implementation gets its own UUID that is joined with the stack name. The feature is currently available behind the `PULUMI_SELF_MANAGED_STATE_LOCKING=1` environment variable flag.
2021-03-16 14:00:47 +11: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
Luke Hoban 8fc6f910b4
Fix mustWrite for Input/Output PropertyMaps (#6396) 2021-02-23 09:04:57 +11:00
Paul Stack 1731053b18
[cli] Disable permalinks to the update details page when using elf-managed backends (S3, Azure, GCS) (#6251)
Fixes: #4029
Fixes: #3537

Should the user want to get permalinks when using a self-managed backend, they can pass a flag:
```
$ pulumi up --suppress-permalink false
```

Permalinks for these self-managed backends will be suppressed on `update`, `preview`, `destroy`,
`import` and `refresh` operations.
2021-02-19 23:55:35 +00:00
Evan Boyle 8e58f5d682
Add pagination to pulumi stack history (#6292)
replaces the unreleased `--limit` flag with `--page` and `--page-size` to support full pagination
2021-02-09 16:20:01 -08:00
Evan Boyle 808483218e
fix linting errors in pkg (#6281) 2021-02-08 13:13:55 -08:00
Evan Boyle eefc104c2b
Add --limit flag to pulumi stack history and consume from automation api (#6257)
Adds a `--limit` flag to `pulumi stack history. This allows limiting to the last few entries rather than fetching the entirety of a stack's update history (which can be quite slow for stacks with lots of updates). Example: `pulumi stack history --limit 1` fetches the last history entry only. 

`stack.up` and related operations in the Automation API have been updated to consume this change, drastically reducing overhead.
2021-02-08 10:49:57 -08:00
Chris Smith b29f440f0e
Add comments (#6234) 2021-02-01 16:00:46 -08:00
Mikhail Shilkov 4335a44bfb
Relax the diff path check to avoid panic (#6159) 2021-01-22 12:00:44 +01:00
Paul Stack 61ae57da0c
Add support for pulumi logout --all (#6101) 2021-01-15 13:38:58 +00:00
Levi Blackstone 709fcbad51
Document Go packages (#6009)
Co-authored-by: Pat Gavlin <pat@pulumi.com>
2021-01-11 11:07:59 -07:00
Pulumi Bot 42f355b497
[CLI] Add Version to the output of pulumi stack history (#6063)
fixes: #4328

Allows events to be tracked back to those of the Pulumi SaaS

Co-authored-by: stack72 <public@paulstack.co.uk>
2021-01-07 19:44:15 +00:00
Pat Gavlin eeff5257c3
Do not read TGZs into memory. (#5983)
* Do not read TGZs into memory.

This runs a serious risk of exhausting the memory on lower-end machines
(e.g. certain CI VMs), especially given the potential size of some
plugins.

* CHANGELOG

* fixes
2020-12-20 12:54:11 -08:00
Lee Zen 518ec3a8a5
Assume no terminal if the display width/height is 0 (#5959) 2020-12-18 15:38:15 -08: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
Justin Van Patten 5ab051cd97
Implement GetRequiredPlugins for Python (#5787)
Implement GetRequiredPlugins for Python, which determines the plugins
required by the program.

Also, if the `virtualenv` runtime option is set, and the specified
virtual directory is missing or empty, automatically create it and
install dependencies into it.
2020-12-03 19:22:16 -08:00
Joe Duffy 01d0d64e84
Correctly rename stack files during a rename (#5812)
* Correctly rename stack files during a rename

This fixes pulumi/pulumi#4463, by renaming a stack's configuration
file based on its stack-part, and ignoring the owner-part. Our
workspace system doesn't recognize configuration files with fully
qualified names. That, by the way, causes problems if we have
multiple stacks in different organizations that share a stack-part.

The fix here is simple: propagate the new StackReference from the
Rename operation and rely on the backend's normalization to a
simple name, and then use that the same way we are using a
StackReference to determine the path for the origin stack.

An alternative fix is to recognize fully qualified config files,
however, there's a fair bit of cleanup we will be doing as part of
https://github.com/pulumi/pulumi/issues/2522 and
https://github.com/pulumi/pulumi/issues/4605, so figured it is best
to make this work the way the system expects first, and revisit it
as part of those overall workstreams. I also suspect we may want to
consider changing the default behavior here as part of
https://github.com/pulumi/pulumi/issues/5731.

Tests TBD; need some advice on how best to test this since it
only happens with our HTTP state backend -- all integration tests
appear to use the local filestate backend at the moment.

* Add a changelog entry for bug fix

* Add some stack rename tests

* Fix a typo

* Address CR feedback

* Make some logic clearer

Use "parsedName" instead of "qn", add a comment explaining why
we're doing this, and also explicitly ignore the error rather
than implicitly doing so with _.
2020-12-01 16:55:48 -08:00
Paul Stack 41a881a374
Small UX change to the output of policy violations (#5773)
Fixes: #5626

It used to be:

```
Policy Violations:
    [advisory]  aws v0.1.20200912  allowed-image-owner (demo-aws-ts-webserver-server-0: aws:ec2/instance:Instance)
    Check machine image is from an approved publisher.
    Publisher [137112412989] is not one of [self,099720109477].

```

Notice that it was name: type

We would rather this was type: name

```
Policy Violations:
    [advisory]  aws v0.1.20200912  allowed-image-owner (aws:ec2/instance:Instance: demo-aws-ts-webserver-server-0)
    Check machine image is from an approved publisher.
    Publisher [137112412989] is not one of [self,099720109477].

```
2020-11-17 21:14:28 +00:00
Paul Stack b75ca2602f
Ensure policy events do not cause a panic when using preview --json (#5610) 2020-10-22 20:28:39 +01:00
Paul Stack 7f0bc891c4
Ensure CLI doesn't panic when pulumi watch is used with policies enabled (#5569)
Fixes: #5561
2020-10-17 21:29:16 +01:00
Pat Gavlin 89c71bb49e
[cli] Add an import command. (#4765)
Co-authored-by: stack72 <public@paulstack.co.uk>
2020-10-14 12:51:53 +01:00
Luke Hoban 32f13fabfa Merge branch 'fix_gzip_compression' of https://github.com/birdypme/pulumi into birdypme-fix_gzip_compression 2020-10-05 13:52:23 -07:00
Luke Hoban 3be1ea9592
Fix panic with logs (#5503)
Fixes #5112.
2020-10-02 14:09:34 -07:00
Julien Champseix 3df5d55256 removed superfluous Flush() 2020-10-01 09:07:30 +02:00
Julien Champseix 88c556d2fe restored contract.IgnoreClose on gzip reader, but only when pointer is valid 2020-09-30 22:57:09 +02:00
Julien Champseix 370125868d Merge branch 'master' of github.com:birdypme/pulumi 2020-09-30 22:31:36 +02:00
Julien Champseix bcac6cf1d7 only close the gzip reader if a valid pointer was returned 2020-09-30 21:52:35 +02:00