Apply transitive dependabot go.mod dependency updates as part of automatic Github workflow #844
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new Github workflow (the project's first) which is designed to fix our recent influx of Dependabot PRs which fail to pass our build tests. See #839, #831 et al.
Although Dependabot is correctly modifying the specific module it is working on, Dependabot does not consider any other modules in the repository while constructing the pull request. In our case, every build runs a
go mod tidyacross every go module, resulting in transitive dependencies of the changes introduced by Dependabot (e.g. a change inexporters/otlp/go.modaffects thego.sumfiles inexample/otel-collector/andexample/otlp/) being modified during the build.The workflow contained in this PR is designed to auto-fix these transitive dependencies whenever a pull request has a
dependencieslabel added to it. Itevantorrie/mott-the-tidier@v1-betato perform the samego mod tidyacross a user-defined set of module paths as the CI buildgo.sumchangesThis should then retrigger another CI build with the newly fixed
go.sumfiles, and ideally, pass correctly.It uses two "non-Github-authored" Actions.
evantorrie/mott-the-tidieris written by me with a pre-ES2015 understanding of NodeJS Javascript. In this workflow, it is configured with thegosum_onlygate which will fail if there are any nongo.sumfiles showing as modified in the repo after thego mod tidys complete. This is intended to prevent auto-commit of anything other thango.sumfiles by the subsequent step in the job.stefanzweifel/git-auto-commit-action@v4is available in the Github actions marketplace and commits back to the PR branch any changes created bymott-the-tidier. Since we limitmott-the-tidierto making changes only togo.sumfiles, the resultinggit-auto-commit-actionhas limited capacity for inadvertently corrupting the PR.