Skip to content
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

Fix dirty collection attribute refresh #2065

Closed
wants to merge 76 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
11d6900
integration tests poc
VenelinMartinov Jun 3, 2024
85b8527
fix test
VenelinMartinov Jun 3, 2024
7dd99fa
refactor tests
VenelinMartinov Jun 6, 2024
8727586
lint
VenelinMartinov Jun 6, 2024
28bfadb
go mod tidy
VenelinMartinov Jun 6, 2024
1ba4c87
hide function
VenelinMartinov Jun 6, 2024
b9271d6
move things about
VenelinMartinov Jun 6, 2024
3864781
fix invalid tf provider
VenelinMartinov Jun 6, 2024
db35f45
finish test
VenelinMartinov Jun 6, 2024
2f06781
add some experimental comments
VenelinMartinov Jun 6, 2024
a6cc583
dirty map refresh repro
VenelinMartinov Jun 6, 2024
8e50e2d
remove comments
VenelinMartinov Jun 6, 2024
08d78d3
make test schema valid
VenelinMartinov Jun 6, 2024
9761d63
accidental public var
VenelinMartinov Jun 6, 2024
b775cc6
lint
VenelinMartinov Jun 6, 2024
36c44a8
empty map input cross test
VenelinMartinov Jun 6, 2024
6d81799
move skip unless linux
VenelinMartinov Jun 6, 2024
b3e2c63
Merge branch 'master' into vvm/pulumiTest_integration_tests
VenelinMartinov Jun 6, 2024
f0f0f6f
add tests for explicit empty maps
VenelinMartinov Jun 6, 2024
8823e79
Merge branch 'master' into vvm/dirty_map_refresh_repro
VenelinMartinov Jun 6, 2024
76b4d17
bad merge and fix types
VenelinMartinov Jun 6, 2024
03e4b08
lint
VenelinMartinov Jun 6, 2024
6a78016
Revert "move skip unless linux"
VenelinMartinov Jun 6, 2024
237a202
Merge branch 'master' into vvm/dirty_map_refresh_repro
VenelinMartinov Jun 6, 2024
ce0133d
Merge branch 'master' into vvm/pulumiTest_integration_tests
VenelinMartinov Jun 6, 2024
2cba3b8
Merge branch 'vvm/pulumiTest_integration_tests' into vvm/dirty_map_re…
VenelinMartinov Jun 6, 2024
6e3f3de
Normalize Read result for empty collections
t0yv0 Jun 6, 2024
fc0e64f
First pass
t0yv0 Jun 6, 2024
4acec2c
skip on windows
VenelinMartinov Jun 6, 2024
103ed4a
Scope to provider2.go
t0yv0 Jun 6, 2024
5385d82
Use logger
t0yv0 Jun 6, 2024
2044e8d
Remove fmt.Println
t0yv0 Jun 6, 2024
437997b
Avoid import cycle
t0yv0 Jun 6, 2024
0bd1b5b
bad merge
VenelinMartinov Jun 7, 2024
277d52b
Merge branch 'vvm/pulumiTest_integration_tests' into vvm/dirty_map_re…
VenelinMartinov Jun 7, 2024
929436f
Merge branch 't0yv0/normalize-empty-collections-read' into vvm/dirty_…
VenelinMartinov Jun 7, 2024
609305f
make normalize nulls work recursively
VenelinMartinov Jun 7, 2024
8bc1209
revert bad merge
VenelinMartinov Jun 7, 2024
6226f7b
Merge branch 'master' into vvm/pulumiTest_integration_tests
VenelinMartinov Jun 7, 2024
d6905f4
Merge branch 'vvm/pulumiTest_integration_tests' into vvm/dirty_map_re…
VenelinMartinov Jun 7, 2024
134c45f
revert formatting change
VenelinMartinov Jun 7, 2024
318090d
tests
VenelinMartinov Jun 7, 2024
84cab44
comment about blocks
VenelinMartinov Jun 7, 2024
9bce708
add comment about refresh vs import
VenelinMartinov Jun 7, 2024
c5be08b
add note about tf divergence
VenelinMartinov Jun 7, 2024
8925c0e
remove old note
VenelinMartinov Jun 7, 2024
d5908f7
disable plugin auto plugin acq
VenelinMartinov Jun 7, 2024
2f5858b
non prc tests
VenelinMartinov Jun 7, 2024
2f93f9f
collection refresh tests
VenelinMartinov Jun 7, 2024
dfc2494
Merge branch 'master' into vvm/test_collections_refresh
VenelinMartinov Jun 7, 2024
3202055
fix non-prc tests
VenelinMartinov Jun 10, 2024
fc6d8a5
add nested tests, refactor a bit, add expected failures
VenelinMartinov Jun 10, 2024
dd22d14
expand note
VenelinMartinov Jun 10, 2024
73c5c35
Merge branch 'vvm/test_collections_refresh' into vvm/dirty_map_refres…
VenelinMartinov Jun 10, 2024
b916333
Experiments in schema walkers
t0yv0 Jun 7, 2024
9e641aa
Pass all planResourceChange test cases
t0yv0 Jun 7, 2024
142ba6e
bad merge
VenelinMartinov Jun 10, 2024
a2b8c16
fix nested tests
VenelinMartinov Jun 10, 2024
8ca5c2b
more notes
VenelinMartinov Jun 10, 2024
569a9b6
additional tests on null cloud values
VenelinMartinov Jun 10, 2024
3ff4e6b
Merge branch 'vvm/test_collections_refresh' into vvm/dirty_map_refres…
VenelinMartinov Jun 10, 2024
4c06b7e
Fix timeouts panic
t0yv0 Jun 7, 2024
ebe3c5e
remove skips from PRC tests
VenelinMartinov Jun 10, 2024
2fc9d7a
remove unused function
VenelinMartinov Jun 10, 2024
59d845a
Merge branch 'master' into vvm/dirty_map_refresh_repro
VenelinMartinov Jun 11, 2024
7b2efb7
bad merge
VenelinMartinov Jun 11, 2024
d01e5d3
TEST ONLY :enable PRC by default
VenelinMartinov Jun 11, 2024
c0e013f
revert test only change
VenelinMartinov Jun 11, 2024
a9caa28
remove debug logging
VenelinMartinov Jun 11, 2024
4b0f667
TEST enable PRC by default
VenelinMartinov Jun 11, 2024
170c52d
revert test change
VenelinMartinov Jun 11, 2024
82214b3
config mode attr tests
VenelinMartinov Jun 12, 2024
3758fb5
set repro
VenelinMartinov Jun 12, 2024
b890f3e
Skip cty.Value indexing failures
t0yv0 Jun 12, 2024
6e907e3
Fix typo
t0yv0 Jun 13, 2024
5d60418
Address PR feedback
t0yv0 Jun 13, 2024
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
41 changes: 41 additions & 0 deletions pkg/tests/cross-tests/input_cross_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,3 +615,44 @@ func TestCreateDoesNotPanicWithStateUpgraders(t *testing.T) {
},
})
}

func TestUnspecifiedMap(t *testing.T) {
skipUnlessLinux(t)
runCreateInputCheck(t, inputTestCase{
Resource: &schema.Resource{
Schema: map[string]*schema.Schema{
"tags": {
Type: schema.TypeMap,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
},
},
Config: tftypes.NewValue(tftypes.Object{}, map[string]tftypes.Value{}),
})
}

func TestEmptyMap(t *testing.T) {
skipUnlessLinux(t)
t1 := tftypes.Map{ElementType: tftypes.String}
runCreateInputCheck(t, inputTestCase{
Resource: &schema.Resource{
Schema: map[string]*schema.Schema{
"tags": {
Type: schema.TypeMap,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
},
},
Config: tftypes.NewValue(tftypes.Object{
AttributeTypes: map[string]tftypes.Type{"tags": t1},
}, map[string]tftypes.Value{
"tags": tftypes.NewValue(t1, map[string]tftypes.Value{}),
}),
})
}
Loading