Skip to content

Commit 7cb72e0

Browse files
committed
feat(ci): add GOPROXY and GODEBUG to avoid EOF errors
Configure GOPROXY with direct fallback and disable HTTP/2 client to avoid transient EOF errors from proxy.golang.org on self-hosted runners. Update workflow to use main branch of k8s-workflows.
1 parent 551f71e commit 7cb72e0

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.github/workflows/pull_request.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
build-and-push-arch-specifics:
1111
name: Build Rocks and Push Arch Specific Images
12-
uses: canonical/k8s-workflows/.github/workflows/build_rocks.yaml@KU-4668/go-build-issues
12+
uses: canonical/k8s-workflows/.github/workflows/build_rocks.yaml@main
1313
with:
1414
owner: ${{ github.repository_owner }}
1515
trivy-image-config: "trivy.yaml"
@@ -19,7 +19,6 @@ jobs:
1919
platform-labels: '{"arm64": ["self-hosted", "Linux", "ARM64", "jammy"]}'
2020
enabled-ubuntu-pro-features: "fips-updates"
2121
rockcraft-revisions: '{"amd64": "3494", "arm64": "3547"}'
22-
build-env: '{}'
2322
secrets:
2423
UBUNTU_PRO_TOKEN: ${{ secrets.UBUNTU_PRO_TOKEN }}
2524
run-tests:

0.7.1/rockcraft.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ parts:
3838
- build-essential
3939
build-snaps:
4040
- go/1.21-fips/stable
41+
# Use GOPROXY with direct fallback and disable HTTP/2 to avoid transient EOF errors
42+
# from proxy.golang.org on self-hosted runners
4143
build-environment:
4244
- GOPROXY: https://proxy.golang.org,direct
4345
- GODEBUG: http2client=0
@@ -47,4 +49,3 @@ parts:
4749
make build ARCH="${CRAFT_ARCH_BUILD_FOR}" BINARY_NAME=metrics-server
4850
cp $CRAFT_PART_BUILD/_output/metrics-server $CRAFT_PART_INSTALL
4951
snap refresh go --channel 1.23-fips/stable
50-
# Trigger build

0.7.2/rockcraft.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ parts:
3838
- build-essential
3939
build-snaps:
4040
- go/1.22-fips/stable
41+
# Use GOPROXY with direct fallback and disable HTTP/2 to avoid transient EOF errors
42+
# from proxy.golang.org on self-hosted runners
4143
build-environment:
4244
- GOPROXY: https://proxy.golang.org,direct
4345
- GODEBUG: http2client=0
@@ -47,4 +49,3 @@ parts:
4749
make build ARCH="${CRAFT_ARCH_BUILD_FOR}" BINARY_NAME=metrics-server
4850
cp $CRAFT_PART_BUILD/_output/metrics-server $CRAFT_PART_INSTALL
4951
snap refresh go --channel 1.23-fips/stable
50-
# Trigger build

0.8.0/rockcraft.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ parts:
3838
- build-essential
3939
build-snaps:
4040
- go/1.24-fips/stable
41+
# Use GOPROXY with direct fallback and disable HTTP/2 to avoid transient EOF errors
42+
# from proxy.golang.org on self-hosted runners
4143
build-environment:
4244
- GOPROXY: https://proxy.golang.org,direct
4345
- GODEBUG: http2client=0
@@ -51,4 +53,3 @@ parts:
5153
ls $CRAFT_PART_BUILD/_output
5254
cp $CRAFT_PART_BUILD/_output/metrics-server $CRAFT_PART_INSTALL
5355
snap refresh go --channel 1.23-fips/stable
54-
# Trigger build

0 commit comments

Comments
 (0)