From db77643f04aa50268103b947cbb6250e0ac7e8f3 Mon Sep 17 00:00:00 2001 From: Ethan Rogers Date: Thu, 19 Oct 2023 08:39:55 -0400 Subject: [PATCH] chore: update go and rules_go version older versions of Go suffer from issues with DNS resolution when cross-compiling. the root of the issue is that Go <1.20 uses a built-in DNS resolver which doesn't know how to resolve addresses when connected to any VPN, like AppGate. because of this, rules like `oci_push` cannot push images to GovCloud registry, making it more difficult to do things like deploy from a laptop in the event of an incident. this DNS issue was fixed in 1.20 (see [this article](https://danp.net/posts/macos-dns-change-in-go-1-20/)) for more information. --- .bazelversion | 2 +- WORKSPACE | 8 ++++---- go.mod | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.bazelversion b/.bazelversion index 91ff572..8a30e8f 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -5.2.0 +5.4.0 diff --git a/WORKSPACE b/WORKSPACE index a97238e..a64ecbe 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -4,10 +4,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", - sha256 = "f2dcd210c7095febe54b804bb1cd3a58fe8435a909db2ec04e31542631cf715c", + sha256 = "51dc53293afe317d2696d4d6433a4c33feedb7748a9e352072e2ec3c0dafd2c6", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.31.0/rules_go-v0.31.0.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.31.0/rules_go-v0.31.0.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.40.1/rules_go-v0.40.1.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.40.1/rules_go-v0.40.1.zip", ], ) @@ -90,7 +90,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe go_rules_dependencies() -go_register_toolchains(version = "1.18") +go_register_toolchains(version = "1.20") load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") diff --git a/go.mod b/go.mod index a2b488a..1f26c88 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/DataDog/rules_oci -go 1.18 +go 1.20