pulumi/pkg/backend
bors[bot] 2ef87d86d0
Merge #11803 #11893 #11903 #11922
11803: Display text-based diff if yaml/json diff is semantically equal r=aq17 a=aq17

Fixes #11799 

https://github.com/pulumi/pulumi/pull/9380 and https://github.com/pulumi/pulumi/pull/9484 introduced changes that render JSON/YAML parsable strings as objects in diffs – therefore, examples such as`"foo:\n  bar: {}\n  baz: {}\n"` and `"#foo\nfoo:\n  bar: {}\n  baz: {}\n"` are recognized as equal.

This change causes the display to fall back to showing the text-based diff if the JSON/YAML rendering does not indicate any diff.
It also prints all object keys even if the value is empty, i.e. `bar: {}` or `bar: ""` will be printed instead of `bar` being omitted.

11893: update package details anchors r=sean1588 a=sean1588

fixes: https://github.com/pulumi/registry/issues/1819

OK taking this for round 2. The first [PR](https://github.com/pulumi/pulumi/pull/11861) to make this change I ended up reverting because there were some pages (the function pages and module pages) still being generated with empty href tags. 

I have addressed this and updated the change to define the DisplayName and RepositoryName props on the `packageDetails` struct for the individual module pages and function pages. This updates the repository anchor in the Package Details section of the api docs pages. I updated it to display `<package name> repository` for the anchor text in place of the url that was previously shown there. 

![image](https://user-images.githubusercontent.com/16751381/213036900-2938a9ad-1992-4170-9b83-0fbbcef409a0.png)

So now this will show the following on the following pages:
1. the root index package pages
2. the module pages
3. the resource pages
4. the function pages

11903: ApplyT: Coerce new type wrappers r=abhinav a=abhinav

Adds support to ApplyT to automatically coerce new type wrappers
when calling the provided functions.

With this change, the following is valid:

    var idout pu.IDOutput = ...
    idout.ApplyT(func(id string) string {
        // ...
    })

Note that this does not use `To{Type}Output` methods at this time.
We will likely want to add that in the future given #11750.
We can do that in a backwards compatible way.

This coerces only those values that are defined
with language-level type wrappers in the following form:

    type ID string

This *does not* coerce types with different undedrlying representations.
Specifically, the following conversons are not supported
even though they're supported by Go using the `T(v)` syntax.

    string => int
    string => []byte
    []byte => string

The choice to convert between these types
should be made explicitly by the user
so that they get the semantics they want.

Resolves #11784


11922: ci: freeze 3.52.1 for release r=dixler a=dixler

Patch release to provide better stack traces for python https://github.com/pulumi/pulumi/issues/11887

Co-authored-by: aq17 <aqiu@pulumi.com>
Co-authored-by: Sean Holung <sean.holung@gmail.com>
Co-authored-by: Robbie McKinstry <robbie@pulumi.com>
Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
Co-authored-by: Kyle Dixler <kyle@pulumi.com>
2023-01-19 23:04:19 +00:00
..
display Display text-based diff if yaml/json diff is semantically equal 2023-01-17 17:04:41 -08:00
filestate Merge #11819 #11834 #11842 #11845 2023-01-12 20:11:42 +00:00
httpstate pkg: Drop unnecessary printfs 2023-01-13 12:41:56 -08:00
state [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
apply.go cli/update: Move experimental option to bottom 2023-01-06 14:12:41 -08:00
backend.go Qualify name 2022-11-29 14:07:20 -08:00
backend_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
errors.go Add a link to docs for the 409 Conflict error message (#3207) 2019-09-10 13:25:08 -07:00
mock.go Move default secret manager to stack (#10423) 2022-08-18 15:31:34 +01:00
policypack.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
query.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
snapshot.go Move over some env vars to the new lib 2022-12-15 15:46:39 +01:00
snapshot_test.go Move over some env vars to the new lib 2022-12-15 15:46:39 +01:00
stack.go Move default secret manager to stack (#10423) 2022-08-18 15:31:34 +01:00
updates.go Send update metadata about update plans 2022-10-12 22:55:59 +01:00
watch.go fix: Allow watch on macOS on Apple Silicon (#10605) 2022-09-02 10:38:39 -07:00