-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(terraform): update terraform lock files #8429
feat(terraform): update terraform lock files #8429
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.
Please do not follow npm implementation, use artifact handling like in helmv3
manager.
renovate/lib/manager/helmv3/artifacts.ts
Line 23 in 3ad5f98
export async function updateArtifacts({ |
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.
This needs some unit tests
I have copied the helmv3 unit tests and adapted them to Terraform, but I`m not sure if they are correct like they are right now. |
Hey guys, can we help with this in any way? Would be awesome to see this on master. Cheers |
20d27a4
to
d565e44
Compare
Because of hashicorp/terraform#28333 and as there is no movement regarding the Hashicorp Registry improvements, I will investigate more in the direction to handle the lock file directly without using the terraform binary My initial thoughts are:
Any thoughts from you guys? |
Sounds good. Hashes should be safe to store in global cache for long time as they shouldn't ever change. They are also not privacy relevant. |
changed the approach and dropped the hash generation at the datasource as the intial sync would take about 1-2h per provider. |
@viceice Any chance you find some time this week to take a look? |
Merged latest |
There have been conflicts, but they have been resolved in 051506c |
@secustor Ah, I'm sorry! When I initially looked I was only concerned with git conflicts, and didn't look for implementation conflicts. I hope it wasn't too much difficulty. |
So the first use case for this will be self-hosted only, right? Because it's a env variable then we app users can't opt-in individually. Could be good to have @secustor battle test it a little first anyway :) |
@JamieMagee No problem! I have found this out by accident as I have been merging the main. @rarkins Yes that would work only on self hosted instances. Regarding battle testing, I'm not using lock files as we pin the deps to exact versions. But I'm sure there will be people using it as it has been the most upvoted issue. |
* fix: Revert "fix(manager): optimize lockfile cache handling (#10463)" This reverts commit 713e35e. * fix: Revert "fix(terraform): use path joins instead of slashes (#10461)" This reverts commit 2776db6. * fix: Revert "feat(terraform): update terraform lock files (#8429)" This reverts commit dab27f2.
🎉 This PR is included in version 25.43.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes:
This PR adds a post update hook, similar to NPM to update Terraform lock files.
A Terraform binary ( >= 0.14.0 ) has to be in PATH for this to work.Context:
Prerequisites: renovatebot/docker-renovate-full#256Closes #7895
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via:
https://github.com/secustor/renovate_terraform_lockfile