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 overfitting label tests #2072

Merged
merged 3 commits into from
Jun 13, 2024
Merged

Conversation

VenelinMartinov
Copy link
Contributor

@VenelinMartinov VenelinMartinov commented Jun 11, 2024

During PlanResourceChange these tests was discovered to fail. Looks like this is actually an upstream bug - the provider takes empty string for a label to mean "keep previous value". This was reproed in TF.

I've adjusted the tests to take this into account - they should now work for both PRC and non-PRC. We can remove the non-PRC bit after enabling PRC by default.

fixes #2078

Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

@VenelinMartinov VenelinMartinov changed the title simpler repro for 2079 Fix overfitting label tests Jun 12, 2024
@VenelinMartinov VenelinMartinov marked this pull request as ready for review June 12, 2024 11:35
@@ -370,6 +393,35 @@ func (st labelsState) validateTransitionTo(t *testing.T, st2 labelsState) {
integration.ProgramTest(t, &opts)
}

func (st labelsState) expectedLabelsPRC(prev labelsState) map[string]string {
// Note that the upstream provider actually takes a "" value for a label to mean "keep the previous value".
Copy link
Member

Choose a reason for hiding this comment

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

This is highly suspect, do you have a code reference? This reproduces in TF? I can think of strong customer feedback in AWS that empty tag values should not be specially treated, suspect the same may be the case here.

Copy link
Member

Choose a reason for hiding this comment

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

I see this is present in TF. Still in AWS we were asked to fix it even though TF had this problem. The PR looks good to me but I'd request tracking this problem in the issue tracker so that we can at least call this out to users appropriately when PRC is rolling out.

Copy link
Contributor Author

@VenelinMartinov VenelinMartinov Jun 12, 2024

Choose a reason for hiding this comment

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

I'll open an issue and link it in the rollout issue, thanks

#2083

@t0yv0 t0yv0 self-requested a review June 12, 2024 15:34
@VenelinMartinov VenelinMartinov merged commit faff475 into master Jun 13, 2024
18 checks passed
@VenelinMartinov VenelinMartinov deleted the vvm/simpler_repros_for_2079 branch June 13, 2024 11:44
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.

PlanResourceChange issue with empty strings and GCP labels
2 participants