Skip to content

Commit b188dde

Browse files
authored
Drop stale Go version guard in inv update-go (#48251)
### Motivation The Go version check before running `//pkg/template:generate` and `inv tidy` was introduced when those tasks relied on the system `go` binary. Since #47751 both operations go through Bazel's hermetic Go toolchain, making the system `go` version irrelevant. ### What does this PR do? Remove the guard, which became dead code and should have been removed in the frame of #47751, sorry. Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
1 parent a90a700 commit b188dde

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

tasks/update_go.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,8 @@ def update_go(
9090

9191
_update_references(warn, version)
9292
_update_go_mods(warn, version, include_otel_modules)
93-
94-
# check the installed go version before running tasks requiring the correct version
95-
res = ctx.run("go version")
96-
if res and res.stdout.startswith(f"go version go{version} "):
97-
print("Updating the code in pkg/template...")
98-
bazel(ctx, "run", "//pkg/template:generate")
99-
print("Running the tidy task...")
100-
tidy(ctx)
101-
else:
102-
print(
103-
color_message(
104-
"WARNING: did not run `dda inv tidy` nor `dda inv pkg-template.generate` as the version of your `go` binary doesn't match the requested version",
105-
"orange",
106-
)
107-
)
93+
bazel(ctx, "run", "//pkg/template:generate")
94+
tidy(ctx)
10895

10996
if release_note:
11097
releasenote_path = _create_releasenote(ctx, version)

0 commit comments

Comments
 (0)