terraform/scripts
Martin Atkins 5811be26f8 go.mod: Separate modules at code ownership boundaries
Historically it's been hard for us to keep on top of dependency upgrades
as a matter of course because it's unclear which code owners might be
affected by or responsible for an upgrade of each module.

After trying a few different techniques to try to mitigate this, the most
promising one seems to be to tell the Go toolchain that each of these
components is a separate Go module, but then to stitch them all back
together again using replace directives so that we can mostly ignore these
module boundaries in everyday development.

The one case where we _do_ need to pay attention to these boundaries is
also the case where the separation is useful: upgrading a dependency of
any one of these modules might potentially force upgrading it for another
module too, and so the Go toolchain will help us notice that interaction
and we can immediately which code owners might need to be involved in
reviewing and testing that particular upgrade.

To make that process less onerous, this adds a new makefile target
"make syncdeps" which runs "go mod tidy" in all of the modules at once
and thus forces the toolchain to align their dependencies to the extent
required for them all to be linked together successfully, and to generate
go.mod and/or go.sum diffs that will match our configured code ownership
paths to trigger the appropriate code review requests.

Hopefully before too long we'll be able to move all the backends out into
provider plugins and delete the "legacy" module entirely and then this
oddness won't be needed anymore, but as long as we're all trying to play
together in this same sandbox this is a small amount of extra ceremony in
return for hopefully reducing the level of anxiety involved in keeping the
system's dependencies up to date more consistently.
2024-03-11 08:34:46 -07:00
..
build.sh Exit CD when fail for a variety of reasons 2023-10-27 17:06:39 -04:00
changelog-links.sh Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
copyright.sh ci: Add test for license headers (#34624) 2024-02-14 07:53:39 +00:00
debug-terraform no need for TF_FORK=0 2021-10-28 11:51:39 -04:00
exhaustive.sh Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
gofmtcheck.sh Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
gogetcookie.sh Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
goimportscheck.sh Update copyright file headers to BUSL-1.1 2023-08-10 23:43:27 +01:00
staticcheck.sh Add staticcheck.conf to reduce unactionable noise in IDEs (#34036) 2023-10-12 11:01:12 -07:00
syncdeps.sh go.mod: Separate modules at code ownership boundaries 2024-03-11 08:34:46 -07:00