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: Work around 'unreliable' input data for Registry modules #1456

Merged
merged 3 commits into from
Oct 12, 2023

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Oct 11, 2023

As discovered in hashicorp/vscode-terraform#1582 it turns out that we assume inputs in some modules as required, when they are actually not.

  • Why? - Because we use data from the Registry API, which (incorrectly) indicates some inputs as required.
  • Which ones? - Modules which have "nullable" inputs (variables with default = null)
  • Why? - Because the Registry API did not recognise "nullable" inputs at the time of ingesting the module.
  • Can't the Registry fix this? - The Registry already recognises "nullable" inputs since 19th August 2022.
  • Can't the Registry fix the data then? - This was considered but it involves potentially a lot of modules and module versions, so this is a non-trivial task, esp. given that this would involve basically re-ingesting the modules/versions.

So this ^ is why we're taking a more pragmatic approach and basically treat any required inputs as optional for any modules which we know were published prior to the date when the Registry implemented support for "nullable" inputs.

Importantly, this does not impact recently published modules and module versions. Those will continue to have inputs reflected as-is.

@radeksimko radeksimko added bug Something isn't working diagnostics labels Oct 11, 2023
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

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

Looks like a good pragmatic solution to me

@radeksimko radeksimko merged commit fadfca2 into main Oct 12, 2023
22 checks passed
@radeksimko radeksimko deleted the b-registry-mod-req-inputs branch October 12, 2023 11:03
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 issues.
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 Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working diagnostics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants