Skip to content

Commit

Permalink
Clarified that dependency upgrade PRs should fix any issues with the …
Browse files Browse the repository at this point in the history
…PR (#11227)
  • Loading branch information
melinath authored Jul 22, 2024
1 parent 59c6c29 commit 6440099
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/content/develop/update-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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.

0 comments on commit 6440099

Please sign in to comment.