-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update all versions of the same private module in single terraform file #5786
Update all versions of the same private module in single terraform file #5786
Conversation
Hi @szemek thanks for this contribution! The symmetric difference check for Subtracting two arrays does not do what I expected. For two arrays A and B, So for two arrays
and
subtracting the two from each other will give two different results:
while
I think this is a special case that only applies to Terraform registry dependencies with the same source and different versions. Most other ecosystems will force you to use a single version of a dependency. Also, this may resolve #5128, |
Thanks @Nishnha for checking my changes! When it comes to Git dependencies, I can see that there is a different method for that dependabot-core/terraform/lib/dependabot/terraform/file_updater.rb Lines 76 to 88 in 12bc6f1
so I'll prepare a new pull request with tests. My pull request is approved but my branch is out-of-date with the |
We can handle that since you've given maintainers edit permission on your PR branch. We generally follow a deploy-then-merge process, so whoever gets to it will handle rebasing right before deploying. |
Thanks!
Here's how we handle that Git dependency vs "native" dependency issue for NPM |
…gle terraform file ``` updater | ERROR <job_468187453> No files changed! updater | ERROR <job_468187453> /home/dependabot/terraform/lib/dependabot/terraform/file_updater.rb:44:in `updated_dependency_files' updater | ERROR <job_468187453> /home/dependabot/dependabot-updater/lib/dependabot/updater.rb:746:in `generate_dependency_files_for' updater | ERROR <job_468187453> /home/dependabot/dependabot-updater/lib/dependabot/updater.rb:311:in `check_and_create_pull_request' updater | ERROR <job_468187453> /home/dependabot/dependabot-updater/lib/dependabot/updater.rb:109:in `check_and_create_pr_with_error_handling' updater | ERROR <job_468187453> /home/dependabot/dependabot-updater/lib/dependabot/updater.rb:80:in `block in run' updater | ERROR <job_468187453> /home/dependabot/dependabot-updater/lib/dependabot/updater.rb:80:in `each' updater | ERROR <job_468187453> /home/dependabot/dependabot-updater/lib/dependabot/updater.rb:80:in `run' updater | ERROR <job_468187453> /home/dependabot/dependabot-updater/lib/dependabot/update_files_job.rb:17:in `perform_job' updater | ERROR <job_468187453> /home/dependabot/dependabot-updater/lib/dependabot/base_job.rb:50:in `run' updater | ERROR <job_468187453> bin/update_files.rb:22:in `<main>' ```
Hello,
I noticed that dependabot running for one our repositories had issues with updating one dependency.
After investigation I found out that when single terraform file uses the same private module multiple times, but with different versions, then only first occurrence is found and other are not updated.
This pull request is a bug fix for this situation.