Skip to content

PF detailed diff #2629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion dynamic/testdata/TestPrimitiveTypes/diff(all).golden
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
{
"changes": "DIFF_SOME",
"detailedDiff": {
"attrBoolRequired": {
"kind": "UPDATE"
},
"attrIntRequired": {
"kind": "UPDATE"
},
"attrNumberComputed": {},
"attrNumberRequired": {
"kind": "UPDATE"
},
"attrStringDefault": {},
"attrStringDefaultOverridden": {},
"attrStringRequired": {
"kind": "UPDATE"
}
},
"diffs": [
"attrBoolRequired",
"attrIntRequired",
Expand All @@ -8,5 +25,6 @@
"attrStringDefault",
"attrStringDefaultOverridden",
"attrStringRequired"
]
],
"hasDetailedDiff": true
}
14 changes: 13 additions & 1 deletion dynamic/testdata/TestPrimitiveTypes/diff(some).golden
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
{
"changes": "DIFF_SOME",
"detailedDiff": {
"attrNumberComputed": {},
"attrNumberRequired": {
"kind": "DELETE"
},
"attrStringDefault": {},
"attrStringDefaultOverridden": {},
"attrStringRequired": {
"kind": "UPDATE"
}
},
"diffs": [
"attrNumberComputed",
"attrNumberRequired",
"attrStringDefault",
"attrStringDefaultOverridden",
"attrStringRequired"
]
],
"hasDetailedDiff": true
}
4 changes: 4 additions & 0 deletions pkg/pf/tests/diff_secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
)

func TestSecretBasic(t *testing.T) {
t.Skip("skipping until #2643")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in #2643

t.Parallel()
provBuilder := providerbuilder.NewProvider(
providerbuilder.NewProviderArgs{
Expand Down Expand Up @@ -65,6 +66,7 @@ Resources:
}

func TestSecretSet(t *testing.T) {
t.Skip("skipping until #2643")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in #2643

t.Parallel()

provBuilder := pb.NewProvider(pb.NewProviderArgs{
Expand Down Expand Up @@ -158,6 +160,7 @@ Resources:
}

func TestSecretObjectBlock(t *testing.T) {
t.Skip("skipping until #2643")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in #2643

t.Parallel()

provBuilder := pb.NewProvider(pb.NewProviderArgs{
Expand Down Expand Up @@ -259,6 +262,7 @@ Resources:
}

func TestSecretPulumiSchema(t *testing.T) {
t.Skip("skipping until #2643")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in #2643

t.Parallel()

provBuilder := pb.NewProvider(pb.NewProviderArgs{
Expand Down
19 changes: 17 additions & 2 deletions pkg/pf/tests/provider_diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ func TestOptionRemovalTestresDiff(t *testing.T) {
"changes": "DIFF_SOME",
"diffs": [
"optionalInputString"
]
],
"hasDetailedDiff": true,
"detailedDiff": {
"optionalInputString": {
"kind": "DELETE"
}
}
}
}
`
Expand Down Expand Up @@ -121,6 +127,8 @@ func TestEmptyTestresDiffWithOptionalComputed(t *testing.T) {

func TestDiffWithSecrets(t *testing.T) {
t.Parallel()
t.Skip("TODO: secrets")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in #2643


server, err := newProviderServer(t, testprovider.RandomProvider())
require.NoError(t, err)

Expand Down Expand Up @@ -165,6 +173,7 @@ func TestDiffWithSecrets(t *testing.T) {
// See https://github.com/pulumi/pulumi-random/issues/258
func TestDiffVersionUpgrade(t *testing.T) {
t.Parallel()
t.Skip("TODO: secrets")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in #2643

server, err := newProviderServer(t, testprovider.RandomProvider())
require.NoError(t, err)
testCase := `
Expand Down Expand Up @@ -307,7 +316,13 @@ func TestSetNestedObjectAddedOtherDiff(t *testing.T) {
"diffs": [
"other",
"vlanNames"
]
],
"hasDetailedDiff": true,
"detailedDiff": {
"other": {
"kind": "UPDATE"
}
}
}
}
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ Plan: 0 to add, 1 to change, 0 to destroy.
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ keys: [
[0]: "val1"
[1]: "val2"
+ [2]: "val3"
]
Resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Plan: 0 to add, 1 to change, 0 to destroy.
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ keys: [
[0]: "val1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks bad still?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is #2295

~ [1]: "val3" => "val2"
+ [2]: "val3"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Plan: 0 to add, 1 to change, 0 to destroy.
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ keys: [
[0]: "value"
+ [1]: "value1"
]
Resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Plan: 0 to add, 1 to change, 0 to destroy.
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ keys: [
[0]: "value"
- [1]: "value1"
]
Resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,26 +71,6 @@ Plan: 0 to add, 1 to change, 0 to destroy.
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ keys: [
[0]: "value0"
[1]: "value1"
[2]: "value2"
[3]: "value3"
[4]: "value4"
[5]: "value5"
[6]: "value6"
[7]: "value7"
[8]: "value8"
[9]: "value9"
[10]: "value10"
[11]: "value11"
[12]: "value12"
[13]: "value13"
[14]: "value14"
[15]: "value15"
[16]: "value16"
[17]: "value17"
[18]: "value18"
[19]: "value19"
+ [20]: "value20"
]
Resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ Plan: 0 to add, 1 to change, 0 to destroy.
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ keys: [
[0]: "val1"
[1]: "val2"
- [2]: "val3"
]
Resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Plan: 0 to add, 1 to change, 0 to destroy.
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ keys: [
[0]: "val1"
~ [1]: "val2" => "val3"
- [2]: "val3"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong, will fix in #2660

Similar for all other cases when an ID diff is not displayed for a replace.

~ keys: [
+ [0]: "value"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
[0]: "val1"
[1]: "val2"
+ [2]: "val3"
]
Resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
~ [0]: "val2" => "val1"
~ [1]: "val3" => "val2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
[0]: "val1"
~ [1]: "val3" => "val2"
+ [2]: "val3"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
- keys: []
Resources:
+-1 to replace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
~ [0]: "value" => "value1"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
+ keys: []
Resources:
+-1 to replace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
[0]: "value"
+ [1]: "value1"
]
Resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
[0]: "value"
- [1]: "value1"
]
Resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,7 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
[0]: "value0"
[1]: "value1"
[2]: "value2"
[3]: "value3"
[4]: "value4"
[5]: "value5"
[6]: "value6"
[7]: "value7"
[8]: "value8"
[9]: "value9"
[10]: "value10"
[11]: "value11"
[12]: "value12"
[13]: "value13"
[14]: "value14"
[15]: "value15"
[16]: "value16"
[17]: "value17"
[18]: "value18"
[19]: "value19"
+ [20]: "value20"
]
Resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
~ [0]: "value0" => "value20"
~ [1]: "value1" => "value0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
- keys: [
- [0]: "value"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
+ keys: [
+ [0]: "value"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
- [0]: "value"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
[0]: "val1"
[1]: "val2"
- [2]: "val3"
]
Resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
~ [0]: "val1" => "val2"
~ [1]: "val2" => "val3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
[0]: "val1"
~ [1]: "val2" => "val3"
- [2]: "val3"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Plan: 1 to add, 0 to change, 1 to destroy.
+-testprovider:index/test:Test: (replace)
[id=test-id]
[urn=urn:pulumi:test::project::testprovider:index/test:Test::p]
~ id : "test-id" => output<string>
~ keys: [
+ [0]: {
+ nested: "value"
Expand Down
Loading
Loading