-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Add provider protocol compatibility UI err msg during registry discovery #19976
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I left a note inline about filtering prerelease versions but I'm happy to get this merged and then work on that as a separate changeset if you'd like.
We also talked out-of-band about the exact rendering of the error messages; happy also to iterate on that in subsequent commits, since it's not a hard blocker for release.
} | ||
} | ||
return nil, ErrorNoVersionCompatible | ||
if earliest == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I noticed in your screenshots in the PR is that it proposed an alpha build as the "earliest version" supporting protocol 5. This makes me think we should filter out prereleases from consideration here since the suggestion in the error message (using ~> 2.0
) can't actually match prerelease versions... prereleases are only selected if they are specified exactly.
Philosophically too, I think we want to avoid ever promoting the use of prereleases outside of a release notes context where we can give more information about the expectations for the release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great catch & point! I'll merge and iterate on the how pre-releases are handled to never be suggested by Terraform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up PR for posterity #19977
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
[update] a few followup PRs #19977 #19981 related to this feature
The changes add a UI error during provider discovery with the registry to suggest to users to update constraints with the closest provider version with compatible plugin protocol.
Output of
init
on TF config with providernull
version constraint1.0.0
and plugin protocol5
Output of
init
on TF config with providernull
version constraint3.0.0-pre
and plugin protocol5
Local registry test setup with provider null with versions and varying protocol ranges