Commit graph

45 commits

Author SHA1 Message Date
Ian Wahbe b0dfad44c5
Update pkg -> sdk dependency (#8442) 2021-11-17 15:24:09 -08:00
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
Emiliza Gutierrez a1b6b1ee6a
update go.sum files (#8151) 2021-10-06 11:54:59 -07:00
Komal 0bcf475573
Update SDK version in pulumi/pkg (#8027) 2021-09-22 13:16:08 -07:00
Pat Gavlin 236ce54269
[schema] Add the Pulumi Package metaschema. (#7952)
The Pulumi Package metaschema is a JSON schema definition that describes
the format of a Pulumi Package schema. The metaschema can be used to
validate certain basic properties of a Pulumi Package schema, including
(but not limited to):

- data types (e.g. is this property a string?)
- data formats (e.g. is this string property a valid regex?)
- object shapes (e.g. is this object missing required properties?)

The schema binder has been updated to use the metaschema as its first
validation pass.

In addition to its use in the binder, the metaschema has its own page in
the developer documentation. This page is generated using a small tool,
jsonschema2md.go.
2021-09-20 12:00:42 -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
Ian Wahbe 784c661c0c Make linter happy 2021-08-23 12:04:52 -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
Pat Gavlin 4da051a799
Add a convert-trace command. (#7319)
This command converts an appdash trace into a pprof file for use with
`go tool pprof`. Spans are converted into stacks by sampling each root
span at a given rate and recording the stack of subspans at each sample.

These changes also replace the conditional addition of experimental and
debug commands with conditional visibility. Experimental and debug
commands will always be available, but will be hidden unless the
appropraite environment variables are set.

Co-authored-by: Levi Blackstone <levi@pulumi.com>
2021-06-17 14:46:05 -07:00
Emiliza Gutierrez 8dda59d10f
Bumping version of go-cloud to v.0.23.0 (#7204)
* updating to go-cloud 0.23.0

* referencing go-cloud directly, remove fork reference

* updating dependencies from make ensure

* updating changelog
2021-06-03 15:28:33 -07:00
Paul Stack 558aec5cef
Fixup go.sum file to prevent dirty builds (#7090) 2021-05-19 14:33:48 -07:00
Justin Van Patten f973fbcf58
[sdk/nodejs|python] Add GetSchema support to providers (#6892) 2021-05-19 07:11:18 -07:00
stack72 2a224982a5 Reconcile master with 2.25.x patch releases 2021-04-17 11:43:08 +01:00
stack72 e05477b8d6 [deps] Ensuring pulumi/pulumi pkg references pulumi sdk v3.0.0-beta.1 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
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
Paul Stack 0241fb282c
Upgrading to go-cloud v0.22.0 (#6473) 2021-03-09 18:59:01 +00:00
stack72 4c4a4733e8 Fixing up the go deps as this was breaking the publish step 2020-12-08 14:30:21 +00: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
Levi Blackstone aec5ada15d
[sdk/go]: Add support for getResource to Go SDK (#5823)
- Clean up resourceOptions and associated methods
- Add URN field and setter function
- Invoke getResource if URN set
2020-12-01 11:03:47 -07: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
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
Paul Stack 44a806180b
Bump version of go-cloud to v0.20.0 (#5156) 2020-08-11 17:48:56 +01: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
Pat Gavlin 3d4c6523d2
[schema/docs] Use a Markdown parser. (#4838)
In particular, use the parser to filter and extract examples. This also
sets up support for entity references in documentation that can be used
in order to render language-specific names for resources, functions,
types, and properties.

Related to #4632 and #4159.
2020-06-17 14:02:45 -07:00
Justin Van Patten 78270ae3fc
Fix panic on pulumi up prompt when filtering and hitting arrow key (#4808)
When running `pulumi up`, after the preview, we prompt asking whether to proceed with the update. If you type to filter the options and then hit an arrow key a couple times, the CLI panics. This is a bug in the `survey` library we depend on. The issue has been fixed in the library upstream; this change updates our dependency.
2020-06-11 12:34:15 -07: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
Lee Briggs 362fc8d7f2
Merge branch 'master' into feature/go-cloud-azurekeyvault-regions 2020-05-19 08:07:09 -07:00
Pat Gavlin 088751a4a8
[codegen/hcl2] Refactor package schema loading. (#4661)
- Move the implementation of loadPackageSchema into a method on
  PackageCache
- Protect the cache with synchronization primitives to enable
  concurrency in downstream consumers
- Use jsoniter to deserialize schemas
2020-05-18 17:35:11 -07:00
Lee Briggs 72766fd4e6
Use latest upstream of gocloud.dev 2020-05-18 07:43:41 -07:00
Lee Briggs e045c2ac71
# This is a combination of 2 commits.
# This is the 1st commit message:

Use patched azure gocloud library

Fixes #4642

# The commit message #2 will be skipped:

# sync with pulumi-master branch
2020-05-18 07:43:20 -07:00
Paul Stack f06e48b414
Enable fish completions for pulumi cli (#4401) 2020-04-30 15:45:57 +01:00
Pat Gavlin 2e9499a000
[codegen/hcl2] Fix the apply rewriter. (#4486)
Some of the apply rewriter's assumptions were broken by the richer
expressions available in HCL2. These changes fix those broken
assumptions, in particular the assumption that only scope traversal
expressions are sources of eventual values.
2020-04-24 22:04:24 -07: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 80f1989600
Removing the need for vendoring (#4167) 2020-03-25 15:57:46 -07:00
Evan Boyle 61928f04e0
fix go.mod dependencies (#4152) 2020-03-22 12:48:43 -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 be4b523e55 create go.mod for top level packages pkg sdk examples tests 2020-03-18 16:30:44 -07:00