Commit graph

3084 commits

Author SHA1 Message Date
Fraser Waters 1db1ab5137 notes 2021-11-05 18:44:10 +00:00
Fraser Waters 82222cc19e property set shrink test 2021-11-05 14:56:49 +00:00
Fraser Waters 12c0188329 Merge remote-tracking branch 'origin/master' into ctpp 2021-11-04 21:00:51 +00:00
Fraser Waters 3e73c036fb Fix test for missing creates 2021-11-04 19:32:11 +00:00
Fraser Waters f4c28053f8 Test missing create 2021-11-04 16:52:39 +00:00
Justin Van Patten 414ef7e9d0
[programgen/go] Don't change imported resource names (#8353)
When importing a resource in Go, we change resource names with hyphens to snake_case. This happens because we introduced a change that converts the resource name to a valid Go identifier so it can be used as a local variable. But we were also using this converted name as the string resource name, which causes problems with import: the imported resource in the state file has the original resource name, but the generated program uses the converted name, causing Pulumi to delete and recreate the resource when adopting the generated import code.

This change fixes the issue by maintaining the original resource name, and only using the converted name for variables.
2021-11-04 09:28:48 -07:00
Fraser Waters d995901fa7 Test expected delete 2021-11-04 15:51:46 +00:00
Fraser Waters 505e4c5d06 Test expected deletes 2021-11-04 15:26:01 +00:00
Fraser Waters 5352638e51 lint 2021-11-04 11:54:04 +00:00
Fraser Waters fdea5bb588 Readd test_plan.go 2021-11-04 11:22:20 +00:00
Fraser Waters b5eb955301 Merge remote-tracking branch 'origin/master' into ctpp 2021-11-04 10:07:10 +00: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
Justin Van Patten f989e1cc9d
Update pkg -> sdk dependency (#8346) 2021-11-03 11:25:20 -07:00
Fraser Waters b1e23a5287 More tests 2021-11-03 15:56:42 +00:00
Fraser Waters 83e2cd7e4a Fix cmdutil.PrintTable to handle non-simple strings 2021-11-03 10:24:42 +00:00
Pat Gavlin af151b60c5
[codegen/go] Slightly simplify enum type gen. (#8341)
- Remove enumElementType, whose functionality duplicates work done in
  argsTypeImpl
- Clarify the args- vs. Go-ness of the two element types

This is prep work for #7943. These changes should not produce codegen diffs.
2021-11-02 17:41:06 -07:00
Fraser Waters 8fae881a81 Fix colors 2021-11-02 22:41:17 +00:00
Fraser Waters 155c035e34 Liniting and test fixing 2021-11-02 13:52:21 +00:00
Fraser Waters 0d9043f6a2 Merge remote-tracking branch 'origin/master' into ctpp 2021-11-02 09:19:17 +00:00
Anton Tayanovskyy 343b4a3501
Fix #8172 (#8320)
* Fix #8172

* Accept test baselines

* Update CHANGELOG_PENDING
2021-11-01 13:21:01 -04:00
Pat Gavlin 90b75141cb fixup 2021-10-29 09:07:02 -07:00
Pat Gavlin 954bdc025b WIP: outputs in plans 2021-10-29 08:44:33 -07:00
Pat Gavlin 24a0eb0274 fixes for rebase breaks and diffs 2021-10-29 08:44:33 -07:00
Pat Gavlin 908c3aeb70 Update message 2021-10-29 08:44:31 -07:00
Pat Gavlin 6de090c540 Renames 2021-10-29 08:44:03 -07:00
Pat Gavlin 2818c9888d constraints 2021-10-29 08:43:21 -07:00
Pat Gavlin bbfd8256de plan renderer 2021-10-29 08:43:20 -07:00
Pat Gavlin 13f8d342ce Update wording 2021-10-29 08:43:20 -07:00
Pat Gavlin e101f80839 Plumb plans through the CLI. 2021-10-29 08:43:18 -07:00
Pat Gavlin 33e8980cee Implement resource plans in the engine 2021-10-29 08:42:44 -07:00
Praneet Loke 9a78ca1ca4
[codegen/schema] Add DisplayName and Publisher to the schema (#8276) 2021-10-27 12:53:09 -07:00
Ian Wahbe 530641576d
[codegen/go] allow plain default types (#8254)
* Respect `plain` when generating default values.

* Add new test

* Simplify test case

* Add indirection to allow taking references

* Reflect indirection problem in tests

* Remove Plain fields. Base off of primitive type

* Reenable docs

* Update changelog

* Implement always default solution

* Fix test by pulling in master

* Add enum test and cleanup

* Fix const handling

* Clarify the changelog
2021-10-26 17:18:48 -07:00
Komal 2f433d64b7
[cli] Emit JSON events for updates via --json flag (#8275) 2021-10-26 16:21:27 -07:00
Ben Schiborr df61004e3f
Ability to require minimum Python version (#8296)
Co-authored-by: Komal <komalsali@gmail.com>
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2021-10-26 14:33:21 -07:00
svangordon-fruit 22d2ef247f
Allow hyphens in middle portion of token (#8282) 2021-10-25 17:15:17 -07:00
Anton Tayanovskyy b8514450b5
Update pkg -> sdk dependency for v3.16.0 (#8271) 2021-10-20 14:11:38 -04:00
Praneet Loke d73c380bef
[codegen/docs] Sort the package tree items (#8262)
* Sort the modules, resources and functions individually as the package tree is created

* Update package tree test
2021-10-19 15:21:39 -07:00
Anton Tayanovskyy cb51313512
Cover GetAmiIds at unit test level (#8261) 2021-10-19 18:18:25 -04:00
Ian Wahbe f12b8fa00c
Cleanup program-gen test dependency gathering (#8248) 2021-10-19 12:17:19 -07:00
Anton Tayanovskyy e710125885
5758 for C#/.NET (#7899)
* Rebase 5758 .NET work and make output-funcs pass

* Propagate changes to the other examples

* CHANGELOG

* Address PR feedback

* Add a test reproducing aws-native compilation failure

* Fix dangling type ref issue in the .NET backend for codegen

* Accept changes and unskip simple-methods-schema compile check

* Accept changes in node, python, go codegen

* SDK changes to enable a better implementation approach

* Switch approach to support functions like GetAmiIds; avoid name conflicts under tfbridge20

* Make all dotnet tests pass, mechanical fixes + accept test output

* Accept python changes

* Accept node output

* Accept docs changes

* Deepen the unit test to cover the interesting helper type

* Accept go changes and fixup tests

* Implement dep propagation through Invoke

* Fixup cyclic-types

* Accept codegen

* NOTE we now require .NET SDK 3.15 or higher
2021-10-18 18:18:15 -04:00
Paul Stack 7ef0b83c0c
Ensuring Helm based components for CodeDNS and Cert Manager are available in title Lookups" (#8244) 2021-10-18 15:24:46 +03:00
Praneet Loke 0f5b7c765b
[codegen/docs] Update API docs templates to include layout front-matter param (#8242)
* Update generation templates

* Updated templates for codegen

* Rm api-doc-resource template

* Update templates to use layout:api and no alias

* Set no_edit_this_page to true in the header and index templates used by docs gen.

* Update docs generation baseline test files with template updates

* Remove the notion of menu from resource templates (#8200)

* Update the title lookup map entry for aws-api-gateway

* Updated CSS classes for icons in API docs template

* Updated tests:

* Additional test file updates

* Fixup package names

Co-authored-by: Devon Grove <devon@pulumi.com>
Co-authored-by: Christian Nunciato <c@nunciato.org>
Co-authored-by: stack72 <public@paulstack.co.uk>
2021-10-17 22:36:31 -07:00
Anton Tayanovskyy a6e02d6dd8
Update pkg and tests pulumi/sdk refs to v3.15.0 (#8227) 2021-10-14 21:05:42 -04:00
Anton Tayanovskyy 6766e53574
Pin Python versions for tests running on GHA Windows workers (#8225)
* Pin Python versions for tests running on GHA Windows workers

* Fix interpolation syntax
2021-10-14 15:08:49 -07:00
Ian Wahbe dbc5979501
iwahbe/add aditional input registration types (#8204)
* Add registration for resources and enums

* Update tests

* Fix enum registration instances

* Update changelog

* Add the rest of the reference types

* Fix nit

* Remove reference from Map and Array types
2021-10-14 10:41:40 -07:00
Cameron Stokes 562c9da008
Fix help message to fix formatting on docs page (#8211) 2021-10-13 15:29:52 -07:00
Ian Wahbe 208c6ec44d
Add flag for input registration to the go schema (#8198)
* Add flag

* Update CHANGELOG_PENDING.md

* Add this feature to an orthogonal test
2021-10-12 10:15:24 -07:00
Ian Wahbe b978a9f2d2
Accommodate - in base segments for baseImportPaths (#8190) 2021-10-12 09:13:13 -07:00
Ian Wahbe 28528ba26b
Fix default package name (#8187)
* Fix default pacakge name

* Update changelog

* Generalize naming functions
2021-10-11 15:28:11 -07:00
Ian Wahbe 5b7a65939b
Clarify error message language (#8188) 2021-10-11 15:21:58 -07:00