Git-Tags Terraform Module regex incorrectly parses domains containing ".git" leading to failed source module resolution #44298
-
How are you running Renovate?Self-hosted Renovate CLI Which platform you running Renovate on?GitLab (.com or self-hosted) Which version of Renovate are you using?43.247.1 Please tell us more about your question or problemThe regex being used to identify ".git" within git-tags based module references is wiping out any instances of .git in the source URL; This means source URLs which contain the keyword ".git" in the domain, are getting incorrectly extracted; so the extractor is unable to find the latest version of the git-tags referenced module. gets resolved\extracted to renovate/lib/modules/manager/terraform/extractors/others/modules.ts Lines 21 to 23 in 9ad7875 renovate/lib/modules/manager/terraform/extractors/others/modules.ts Lines 110 to 111 in 9ad7875 Example fix; is to scope the .git to only replace if it's at the end (assuming that's the intended behaviour) dep.depName = gitTagsRefMatch.groups.path.replace('/\.git$/', '');
dep.packageName = gitTagsRefMatch.groups.url.replace('/\.git$/', '');this was introduced with : c841ea1 suggest update the .specs file to include additional tests that feature ".git" in the url components of the referenced module path names Example Terraform Module referencemodule {
source = "git::https://xyz.git-lab.dedicated.com/tf-modules/modules.git?ref=v1.0.0"
...
}Logs (if relevant)Logs |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Issue created: #44332 PR welcome |
Beta Was this translation helpful? Give feedback.
Issue created: #44332
PR welcome