Commit graph

27 commits

Author SHA1 Message Date
Fraser Waters b58c39476f
Fix cmdutil.PrintTable to handle ansi escapes and non-byte glyphs (#8344)
Fixes two bugs in how padding was calculated in PrintTable.

Firstly we remove all ANSI escape codes from the string before measuring
how wide it is. Secondly we measure glyph count (using rivo/uniseg) not
byte or rune count of the string.

Together these fix the padding/alignment issues I saw when using
PrintTable with plan output. They also slightly change the layout of
"pulumi stack", for example the below is printed with current master and
has 6 characters of space for padding between SecurityGroup and
web-secgrp:

```
Current stack resources (4):
    TYPE                                        NAME
    pulumi:pulumi:Stack                         aws-cs-webserver-test
    ├─ aws:ec2/securityGroup:SecurityGroup      web-secgrp
    ├─ aws:ec2/instance:Instance                web-server-www
    └─ pulumi:providers:aws                     default_4_25_0
```

While printed with this commit you only get 2 characters of space for
padding (which is correct, the column gap is set to "  "):
```
Current stack resources (4):
    TYPE                                    NAME
    pulumi:pulumi:Stack                     aws-cs-webserver-test
    ├─ aws:ec2/securityGroup:SecurityGroup  web-secgrp
    ├─ aws:ec2/instance:Instance            web-server-www
    └─ pulumi:providers:aws                 default_4_25_0
```
2021-11-04 10:06:20 +00:00
Ian Wahbe 20287afdd7
Iwahbe/8000/uprgade go versions (#8171)
* Upgrade the pulumi cli to go1.17.1

* Run go mod tidy

* Update CHANGELOG_PENDING.md

* Update pkg/go.mod for go1.17

* Update sdk and tests
2021-10-11 09:47:08 -07:00
Justin Van Patten 0c0684af5c
Initial support for (un)marshaling output values (#7861)
This change expands the definition of `resource.Output` in the Go SDK with additional information about the output, i.e. dependencies and secretness, and adds support in the core Go RPC code for (un)marshaling output values.

Output values are marshaled as special objects ala archives, assets, and resource refs and are unmarshaled as `resource.Output` values.

Subsequent PRs will add:
 - A monitor feature for output values, which will initially be disabled by default but available to turn on via an envvar
 - Support for (un)marshaling output values in each language SDKs
 - A way for providers to indicate support for receiving output values
 - E2E tests
 - Turn the monitor feature on by default (w/ env var to disable) (Note: the current plan is to initially scope this to only be used when marshaling inputs to a multi-language component)
2021-09-13 09:05:31 -07:00
Roopak Venkatakrishnan da2bd2ab04
Update x/sys for sdk to support go 1.17 (#7781)
Co-authored-by: Levi Blackstone <levi@pulumi.com>
2021-08-19 17:11:26 -06: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
Levi Blackstone 2dad8a6649
Revert "Swap out YAML parser library (#6642)" (#6681)
This reverts commit ff2cf70
2021-04-01 14:44:29 -06:00
Levi Blackstone ff2cf701a7
Swap out YAML parser library (#6642)
Related to #423
2021-03-29 14:49:00 -06:00
Paul Stack 3f2d58ef7b
Fixing up go.mod and go.sum to ensure they don't continually change (#6502) 2021-03-11 20:41:45 +00:00
Komal 10d99b8afb
[automation/go] - Expose structured logging (#6436) 2021-03-10 20:49:48 -08:00
Vivek Lakshmanan ed0d427958 Add a python shim script to work around https://github.com/golang/go/issues/42919 2020-12-07 14:17:45 -08:00
Paul Stack d43f8bd311
Fix the go sum files to ensure non dirty tree (#5683) 2020-11-04 20:04:03 +00:00
Lee Briggs 4d96994fd1
switch uuid packages (#5608)
Co-authored-by: Pat Gavlin <pat@pulumi.com>
2020-11-04 03:13:04 +00:00
Paul Stack 5430586a9e
Upgrade to Go v1.15.x (#5467) 2020-10-09 17:35:12 +01:00
Justin Van Patten 46c7c327dd
Install plugin dependencies (#5353)
When installing a plugin, if it contains a `PulumiPlugin.yaml` file with a `runtime` value of `nodejs` or `python`, install dependencies for the plugin.

For Node.js, `npm install` is run (or `yarn install` if `PULUMI_PREFER_YARN` is set).

For Python, a virtual environment is created and deps installed into it.
2020-09-14 13:54:26 -07:00
Lee Briggs bad67d3242
switch os/user with luser
We make several calls to `os/user`, which uses CGO and means
cross-compilation is not possible. This replaces `os/user` with the
`luser` package, which is a drop-in replacement which does not use `CGO`
2020-07-27 14:44:08 -07:00
Paul Stack 6d09fe32df
Add the ability to copy configs between stacks (#4971) 2020-07-17 11:14:10 +01:00
Paul Stack 45e1917a30
Upgrade to Go 1.14.x (#4697) 2020-05-28 12:01:33 +01:00
Justin Van Patten 6b0a845cc1
Support publishing Python policy packs (#4644)
Adds support for publishing Python policy packs to the service, and downloading/using such policy packs when applied to stacks in an organization.
2020-05-22 15:01:15 -07:00
Paul Stack f06e48b414
Enable fish completions for pulumi cli (#4401) 2020-04-30 15:45:57 +01:00
CyrusNajmabadi 66bd3f4aa8
Breaking changes due to Feature 2.0 work
* Make `async:true` the default for `invoke` calls (#3750)

* Switch away from native grpc impl. (#3728)

* Remove usage of the 'deasync' library from @pulumi/pulumi. (#3752)

* Only retry as long as we get unavailable back.  Anything else continues. (#3769)

* Handle all errors for now. (#3781)


* Do not assume --yes was present when using pulumi in non-interactive mode (#3793)

* Upgrade all paths for sdk and pkg to v2

* Backport C# invoke classes and other recent gen changes (#4288)

Adjust C# generation

* Replace IDeployment with a sealed class (#4318)

Replace IDeployment with a sealed class

* .NET: default to args subtype rather than Args.Empty (#4320)

* Adding system namespace for Dotnet code gen

This is required for using Obsolute attributes for deprecations

```
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'ObsoleteAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'Obsolete' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
```

* Fix the nullability of config type properties in C# codegen (#4379)
2020-04-14 09:30:25 +01:00
Evan Boyle ab659aa0c1
Reimplement getRequiredPlugins for go sdk (#4297) 2020-04-06 12:30:40 -07:00
stack72 a1af9289c3 Move BuildUtil class to sdk
This was still in pkg and wasn't accessible from the scripts location.
This code should be in the go/common location of sdk so that it can be
accessed from within our build scripts

Without this change, we were not able to get access to the Version number
for Python and none of our Python builds have been publishing binaries
2020-03-31 12:07:24 +01:00
Evan Boyle 80f1989600
Removing the need for vendoring (#4167) 2020-03-25 15:57:46 -07:00
evanboyle 4e44854308 replace glog with klog 2020-03-19 08:56:44 -07:00
evanboyle 1fa50398e2 update go.mods to pin to correct version of pb 2020-03-18 17:25:42 -07:00
evanboyle 71926f1af8 update go.mod after moving the language hosts back to /sdk 2020-03-18 17:16:16 -07:00
evanboyle be4b523e55 create go.mod for top level packages pkg sdk examples tests 2020-03-18 16:30:44 -07:00