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

[Feedback]: Implement automated checks for the module index CSVs #382

Open
1 task done
matebarabas opened this issue Dec 7, 2023 · 6 comments · May be fixed by #1305
Open
1 task done

[Feedback]: Implement automated checks for the module index CSVs #382

matebarabas opened this issue Dec 7, 2023 · 6 comments · May be fixed by #1305
Assignees
Labels
Type: Documentation 📄 Improvements or additions to documentation Type: Hygiene 🧹 things related to testing, issue triage etc. Type: Question/Feedback 🙋 Further information is requested or just some feedback

Comments

@matebarabas
Copy link
Contributor

matebarabas commented Dec 7, 2023

Check for previous/existing GitHub issues

  • I have checked for previous/existing GitHub issues

Description

Implement a GitHub workflow that validates the module index CSVs during PRs: : check all records in all 4 module index CSV files (Bicep/TF, res/ptn modules).

Scenarios to test include but aren't limited to:

  • make sure the telemetry id prefix is within the given character length limits
  • the name of resource modules should be derived from the provider and resource type, based on camel casing
    • Bicep: only use dashes where the word starts with uppercase character in the API definition
  • make sure the "ModuleStatus" column only contains one of the possible states:
    • Proposed :new:
    • Available :green_circle:
    • Orphaned :eyes:
  • if a module is marked available, the module owner display name, and module owner GH handle fields must be populated.
  • if a module is marked orphaned, the module owner display name, and module owner GH handle fields must NOT be populated.
  • if a module is either marked available or orphaned, the first published in field must be populated with the following format: YYYY-MM.

Note: the pattern module CSVs don't have the first 2 columns of the resource module CSVs!

  • if either the "PrimaryModuleOwnerGHHandle" or "PrimaryModuleOwnerDisplayName" has a value, the other one also must have one (both the handle and the display name must be defined, once the owner is identified)
  • if the module status is set to Available :green_circle:
    • make sure the "PrimaryModuleOwnerGHHandle" AND "PrimaryModuleOwnerDisplayName" columns have a value
    • make sure the "FirstPublishedIn" has a value
  • if the module has a secondary owner defined, make sure it also has a primary owner (i.e., if the "SecondaryModuleOwnerGHHandle" and/or the "SecondaryModuleOwnerDisplayName" columns have a value, the "PrimaryModuleOwnerGHHandle" and "PrimaryModuleOwnerDisplayName" columns also must have a value)
  • make sure the values of the "ModuleOwnersGHTeam" and "ModuleContributorsGHTeam" columns follow the naming convention based on the module's name
  • make sure the "ModuleDisplayName" column has a value
  • there must not be any leading or trailing white spaces in any of the fields
  • the first segment of a module's name after avm/res/ or avm-res MUST be equal to the ProviderNamespace's value (first column of the resource CSVs) - i.e., no conversion to singular form!

@ChrisSidebotham - could you please help with this? Thanks!
CC: @AlexanderSehr

@matebarabas matebarabas added Needs: Triage 🔍 Maintainers need to triage still Type: Question/Feedback 🙋 Further information is requested or just some feedback Type: Documentation 📄 Improvements or additions to documentation Status: In Triage 🔍 Picked up for triaging by an AVM core team member labels Dec 7, 2023
@ChrisSidebotham ChrisSidebotham self-assigned this Dec 7, 2023
@ChrisSidebotham
Copy link
Contributor

Thanks Mate - Will review next week and maybe get some time with @AlexanderSehr

@AlexanderSehr
Copy link
Contributor

I hope Regex is strong with you my friend :D
We should anyways have a session to talk through the CI scripts. @ChrisSidebotham

@matebarabas
Copy link
Contributor Author

GitHub Copilot Chat is the name of the game when it comes to regex! ;) That is if they'll be needed at all, as most things we'll need can be translated to splitting/concatenating strings and replacing hyphens with forward slashes or back. :)

@mbilalamjad mbilalamjad removed the Needs: Triage 🔍 Maintainers need to triage still label Feb 8, 2024
@mbilalamjad
Copy link
Contributor

@matebarabas & @ChrisSidebotham guys let us know if there is anything for terraform related index that we need to discuss for this

@matebarabas
Copy link
Contributor Author

I think the first iteration of this solution should be fairly generic. We'd then need to add additional checks later, and this is where we might have differences between Bicep and TF, e.g. naming conventions for patterns. These will just naturally come up, and we'll discuss them along the way! ;)

@matebarabas matebarabas added Type: Hygiene 🧹 things related to testing, issue triage etc. and removed Status: In Triage 🔍 Picked up for triaging by an AVM core team member labels May 22, 2024
@matebarabas
Copy link
Contributor Author

@ChrisSidebotham, I've consolidated #890 into this issue as it was redundant. Let's have a chat internally to decide if you could help with this. Thanks!

@matebarabas matebarabas linked a pull request Aug 16, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation 📄 Improvements or additions to documentation Type: Hygiene 🧹 things related to testing, issue triage etc. Type: Question/Feedback 🙋 Further information is requested or just some feedback
Projects
Status: In Active Discussion
Development

Successfully merging a pull request may close this issue.

4 participants