From 046a99fee690913e9fd3d5b1aed7a4949bc6d316 Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Mon, 22 Jul 2024 15:08:49 -0700 Subject: [PATCH] Clarified that dependency upgrade PRs should fix any issues with the PR Also clarified that they should use the provider, since this reduces potential for errors. --- docs/content/develop/update-dependencies.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/content/develop/update-dependencies.md b/docs/content/develop/update-dependencies.md index f285a436fc58..6f33b70b13ec 100644 --- a/docs/content/develop/update-dependencies.md +++ b/docs/content/develop/update-dependencies.md @@ -5,9 +5,9 @@ aliases: - /docs/update-dependencies --- -# Update `go.mod` +# Update provider dependencies -The Magic Modules repository does not contain a complete Go module, preventing the use of automated tooling like `go get` from that repository. To add or update provider dependencies, use standard Go tooling to update an individual provider and copy the results to the upstream files in Magic Modules. The providers share the same go.mod and go.sum contents so either can be used to generate the changes. +The Magic Modules repository does not contain a complete Go module, preventing the use of automated tooling like `go get` from that repository. To add or update provider dependencies, use standard Go tooling to update the dependency in the `terraform-provider-google` provider and copy the results to the upstream files in Magic Modules. Below are the steps you can follow to make the change: @@ -28,3 +28,6 @@ cd $GOPATH/src/github.com/hashicorp/terraform-provider-google go mod tidy ``` 4. Copy the contents of the updated `go.mod` and `go.sum` file into [`mmv1/third_party/terraform/go.mod.erb`](https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/go.mod.erb) and [`mmv1/third_party/terraform/go.sum`](https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/go.sum) in the `magic-modules` respectively. Ensure `<% autogen_exception -%>` is still at the top of the file afterwards +5. Create a pull request containing _only_ the dependency changes. +6. Resolve any errors caused by the dependency upgrade. +7. After the dependency pull request is merged, continue with a separate pull request for any additional changes that were blocked by the upgrade. \ No newline at end of file