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 adding empty values to maps #1498

Closed
wants to merge 1 commit into from
Closed

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Oct 31, 2023

TBD

Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #1498 (a6951e8) into master (b83370c) will decrease coverage by 4.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1498      +/-   ##
==========================================
- Coverage   61.93%   57.88%   -4.05%     
==========================================
  Files         184      286     +102     
  Lines       32836    39618    +6782     
==========================================
+ Hits        20336    22933    +2597     
- Misses      11362    15348    +3986     
- Partials     1138     1337     +199     
Files Coverage Δ
pkg/tfbridge/diff.go 89.80% <100.00%> (+0.46%) ⬆️

... and 102 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -189,7 +189,17 @@ func makePropertyDiff(ctx context.Context, name, path string, v resource.Propert
name += ".%"
}
}
if d := tfDiff.Attribute(name); d != nil && d.Old != d.New {

if d := tfDiff.Attribute(name); d != nil &&
Copy link
Member Author

Choose a reason for hiding this comment

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

Instead of going with this, I could consider also detecting changes to map counts. The diff has an entry for tags.% that's changing, indicating the number of tags is changing, but is being ignored by makeDetailedDiff. Speaking of which this needs test cases also for changing a non-empty entry to empty and vise versa, and for removing an empty entry, the whole CRUD.

@t0yv0
Copy link
Member Author

t0yv0 commented Nov 2, 2023

Closing in favor of #1502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant