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

Backport of objchange: set length is unknown with partially known elements into v1.5 #33379

Merged

Conversation

teamterraform
Copy link
Contributor

@teamterraform teamterraform commented Jun 15, 2023

Backport

This PR is auto-generated from #33377 to be assessed for backporting due to the inclusion of the label 1.5-backport.

The below text is copied from the body of the original PR.


If a set contains partially known values Length will be unknown which causes assertPlannedObjectValid to fail valid plans.

Revert to the old method if using LengthInt for the set lengths, which returns the maximum number of possible elements, with a guard for entirely unknown set values. Improve the check for incorrectly computed objects to catch existing test cases.

While technically inaccurate, LengthInt values are not going to fail for valid plans and gives us a minimal fix which can be backported to v1.5. A follow up PR for the development branch will contain a more precise fix using value refinements.

fixes #33371

@teamterraform teamterraform force-pushed the backport/jbardin/nesting-set-length/painfully-obliging-buzzard branch 2 times, most recently from 464ce8c to 3aa3137 Compare June 15, 2023 14:26
@hashicorp-cla
Copy link

hashicorp-cla commented Jun 15, 2023

CLA assistant check
All committers have signed the CLA.

If a set contains partially known values the length is unknown which
causes assertPlannedObjectValid to fail valid plans.

Revert to the old method if using LengthInt for the set lengths, which
returns the maximum number of possible elements, with a guard for
entirely unknown set values.
@jbardin jbardin force-pushed the backport/jbardin/nesting-set-length/painfully-obliging-buzzard branch from 8102f4d to cbb309c Compare June 15, 2023 14:33
@jbardin jbardin merged commit a956731 into v1.5 Jun 15, 2023
6 checks passed
@jbardin jbardin deleted the backport/jbardin/nesting-set-length/painfully-obliging-buzzard branch June 15, 2023 14:41
@github-actions
Copy link

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants