Skip to content

Fix a bug in terraform module metadata type detection

What does this MR do and why?

In Parse and create terraform module metadata (!148569 - merged), we introduced a way to parse terraform modules and extract the documentation metadata from them. The changes were gated behind the index_terraform_module_archive feature flag.

After the global rollout of the feature flag, this error was reported on Sentry. After investigation, it turned out that some modules are formatted in a file structure that we didn't take into consideration when we prepared the rules for detecting the module type (root, submodule or example).

In this MR, we modify those rules to take this file structure './root/README.md into consideration.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Follow the same steps mentioned here except for step 2.

Instead of testing with a random module, you can use this onemodule.tgz which has the same file structure that caused the described bug.

Related to #461620

Edited by Moaz Khalifa

Merge request reports