pulumi/pkg/backend/display/testdata/not-truncated
Justin Van Patten 82c546d873
Fix mangled diffs of strings containing url-encoded chars (#16147)
Fix mangled diffs of strings containing url-encoded chars

Currently, modifying a stack output that contains url-encoded characters
can lead to it showing the value as `"!(NOVERB)"` or `"!(MISSING)"`.

For example, changing a stack output `path` from `"%2F"` to `"%2f"`
shows the diff as:

```
Outputs:
  ~ path: "%!(NOVERB)F" => "%!(NOVERB)f"
```

The expected diff output should be:

```
Outputs:
  ~ path: "%2F" => "%2f"
```

This is happening because the code that emits parts of the diff is
expecting a format string. Go is trying to parse the `%` in the value as
a format string and is having problems parsing it.

The fix is to emit the parts of the diff verbatim, so it isn't treated
as a format string.

Fixes #16123

Note: I've done an audit of the other calls to `write` in
`object_diff.go` and all the other call sites are passing actual format
strings or constants. This was the only case where we were passing user
input as a format string.
2024-05-08 08:23:40 +00:00
..
stack-output-resource-diff.json add a test 2023-06-01 13:55:36 +02:00
stack-output-resource-diff.json.interactive-80x24-cooked.stderr.txt add a test 2023-06-01 13:55:36 +02:00
stack-output-resource-diff.json.interactive-80x24-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
stack-output-resource-diff.json.interactive-80x24.stderr.txt add a test 2023-06-01 13:55:36 +02:00
stack-output-resource-diff.json.interactive-80x24.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
stack-output-resource-diff.json.interactive-100x80-cooked.stderr.txt add a test 2023-06-01 13:55:36 +02:00
stack-output-resource-diff.json.interactive-100x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
stack-output-resource-diff.json.interactive-100x80.stderr.txt add a test 2023-06-01 13:55:36 +02:00
stack-output-resource-diff.json.interactive-100x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
stack-output-resource-diff.json.interactive-200x80-cooked.stderr.txt add a test 2023-06-01 13:55:36 +02:00
stack-output-resource-diff.json.interactive-200x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
stack-output-resource-diff.json.interactive-200x80.stderr.txt add a test 2023-06-01 13:55:36 +02:00
stack-output-resource-diff.json.interactive-200x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
stack-output-resource-diff.json.non-interactive.stderr.txt add a test 2023-06-01 13:55:36 +02:00
stack-output-resource-diff.json.non-interactive.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
stack-output-resource-diff.json.stderr.txt add a test 2023-06-01 13:55:36 +02:00
stack-output-resource-diff.json.stdout.txt Don't use printf without a fixed format string 2023-06-21 11:44:06 +01:00
template-body.json Display text-based diff if yaml/json diff is semantically equal 2023-01-17 17:04:41 -08:00
template-body.json.interactive-80x24-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
template-body.json.interactive-80x24-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
template-body.json.interactive-80x24.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
template-body.json.interactive-80x24.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
template-body.json.interactive-100x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
template-body.json.interactive-100x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
template-body.json.interactive-100x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
template-body.json.interactive-100x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
template-body.json.interactive-200x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
template-body.json.interactive-200x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
template-body.json.interactive-200x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
template-body.json.interactive-200x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
template-body.json.non-interactive.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
template-body.json.non-interactive.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
template-body.json.stderr.txt Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
template-body.json.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up-2.json Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
up-2.json.interactive-80x24-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-2.json.interactive-80x24-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-2.json.interactive-80x24.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-2.json.interactive-80x24.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-2.json.interactive-100x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-2.json.interactive-100x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-2.json.interactive-100x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-2.json.interactive-100x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-2.json.interactive-200x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-2.json.interactive-200x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-2.json.interactive-200x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-2.json.interactive-200x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-2.json.non-interactive.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-2.json.non-interactive.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-2.json.stderr.txt Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
up-2.json.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up-3.json Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
up-3.json.interactive-80x24-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-3.json.interactive-80x24-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-3.json.interactive-80x24.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-3.json.interactive-80x24.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-3.json.interactive-100x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-3.json.interactive-100x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-3.json.interactive-100x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-3.json.interactive-100x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-3.json.interactive-200x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-3.json.interactive-200x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-3.json.interactive-200x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-3.json.interactive-200x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-3.json.non-interactive.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-3.json.non-interactive.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-3.json.stderr.txt Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
up-3.json.stdout.txt Don't use printf without a fixed format string 2023-06-21 11:44:06 +01:00
up-4.json Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
up-4.json.interactive-80x24-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-4.json.interactive-80x24-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-4.json.interactive-80x24.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-4.json.interactive-80x24.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-4.json.interactive-100x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-4.json.interactive-100x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-4.json.interactive-100x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-4.json.interactive-100x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-4.json.interactive-200x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-4.json.interactive-200x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-4.json.interactive-200x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-4.json.interactive-200x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-4.json.non-interactive.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-4.json.non-interactive.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
up-4.json.stderr.txt Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
up-4.json.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up-5.json Display outputs last in diff view (#10535) 2022-09-01 12:09:54 -07:00
up-5.json.interactive-80x24-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-5.json.interactive-80x24-cooked.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up-5.json.interactive-80x24.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-5.json.interactive-80x24.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up-5.json.interactive-100x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-5.json.interactive-100x80-cooked.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up-5.json.interactive-100x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-5.json.interactive-100x80.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up-5.json.interactive-200x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-5.json.interactive-200x80-cooked.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up-5.json.interactive-200x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-5.json.interactive-200x80.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up-5.json.non-interactive.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up-5.json.non-interactive.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up-5.json.stderr.txt Display outputs last in diff view (#10535) 2022-09-01 12:09:54 -07:00
up-5.json.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up.json Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
up.json.interactive-80x24-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up.json.interactive-80x24-cooked.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up.json.interactive-80x24.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up.json.interactive-80x24.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up.json.interactive-100x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up.json.interactive-100x80-cooked.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up.json.interactive-100x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up.json.interactive-100x80.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up.json.interactive-200x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up.json.interactive-200x80-cooked.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up.json.interactive-200x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up.json.interactive-200x80.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up.json.non-interactive.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
up.json.non-interactive.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
up.json.stderr.txt Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
up.json.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00
url-encoded-stack-output-diff.json Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-80x24-cooked.stderr.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-80x24-cooked.stdout.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-80x24.stderr.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-80x24.stdout.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-100x80-cooked.stderr.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-100x80-cooked.stdout.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-100x80.stderr.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-100x80.stdout.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-200x80-cooked.stderr.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-200x80-cooked.stdout.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-200x80.stderr.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.interactive-200x80.stdout.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.non-interactive.stderr.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.non-interactive.stdout.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.stderr.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
url-encoded-stack-output-diff.json.stdout.txt Fix mangled diffs of strings containing url-encoded chars (#16147) 2024-05-08 08:23:40 +00:00
webserver-userdata.json Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
webserver-userdata.json.interactive-80x24-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
webserver-userdata.json.interactive-80x24-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
webserver-userdata.json.interactive-80x24.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
webserver-userdata.json.interactive-80x24.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
webserver-userdata.json.interactive-100x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
webserver-userdata.json.interactive-100x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
webserver-userdata.json.interactive-100x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
webserver-userdata.json.interactive-100x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
webserver-userdata.json.interactive-200x80-cooked.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
webserver-userdata.json.interactive-200x80-cooked.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
webserver-userdata.json.interactive-200x80.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
webserver-userdata.json.interactive-200x80.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
webserver-userdata.json.non-interactive.stderr.txt [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
webserver-userdata.json.non-interactive.stdout.txt Policy remediations feature (#14080) 2023-10-09 18:31:17 +00:00
webserver-userdata.json.stderr Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
webserver-userdata.json.stderr.txt Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
webserver-userdata.json.stdout Truncate long stack outputs (#10021) 2022-07-12 11:24:21 -07:00
webserver-userdata.json.stdout.txt Never show property diffs for OpSame (#16024) 2024-05-02 12:28:43 +00:00