Skip to content

Commit

Permalink
Fix out of sync go work and update check (DataDog#31723)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinFairise2 authored Dec 3, 2024
1 parent 45a9bcf commit dbbc50e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
5 changes: 5 additions & 0 deletions tasks/go.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,11 @@ def check_mod_tidy(ctx, test_folder="testmodule"):
check_valid_mods(ctx)
with generate_dummy_package(ctx, test_folder) as dummy_folder:
errors_found = []
ctx.run("go work sync")
res = ctx.run("git diff --exit-code **/go.mod **/go.sum", warn=True)
if res.exited is None or res.exited > 0:
errors_found.append("modules dependencies are out of sync, please run go work sync")

for mod in get_default_modules().values():
with ctx.cd(mod.full_path()):
ctx.run("go mod tidy")
Expand Down
4 changes: 2 additions & 2 deletions tools/retry_file_dump/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ module github.com/DataDog/datadog-agent/tools/retry_file_dump

go 1.22.0

require github.com/golang/protobuf v1.4.3
require github.com/golang/protobuf v1.5.4

require (
github.com/google/go-cmp v0.6.0 // indirect
google.golang.org/protobuf v1.23.0 // indirect
google.golang.org/protobuf v1.35.2 // indirect
)
22 changes: 4 additions & 18 deletions tools/retry_file_dump/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dbbc50e

Please sign in to comment.