From b66fe98b74cb6ca02e6631c9a25af5360274af01 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Fri, 24 Jul 2026 15:47:27 +0100 Subject: [PATCH 1/2] Remove the armhf binary from the release The 32-bit Arm binary is the least used artifact in every release, at roughly 0.4% of downloads, and it is the only target that cannot fail anywhere except during a release, because the cross-compile lives in Dockerfile.redist which only the publish workflow builds. A compile error specific to it took out 0.18.12 and forced a retraction. Nothing else in the project ships armhf any more. The faas-cli container images are already limited to linux/amd64 and linux/arm64, and the language templates dropped armhf when they moved to buildx. The gateway does not support it, so an armhf user could only ever run the CLI against a remote cluster. Drop the build stage, the release asset, the Make targets and the integration test branch. The npm installer now reports an unsupported platform for armv6l and armv7l rather than fetching a binary that is no longer published. Anyone who still needs it can pin to 0.18.11 or earlier. Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- .gitignore | 1 - CONTRIBUTING.md | 2 +- Dockerfile.redist | 8 -------- Makefile | 8 -------- build_integration_test.sh | 7 ------- commands/local_run_resources.go | 2 +- extract_binaries.sh | 1 - npm/lib.js | 4 ---- npm/test.js | 10 +++------- 9 files changed, 5 insertions(+), 38 deletions(-) diff --git a/.gitignore b/.gitignore index 01974abac..c6e0a5ec5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ build faas-cli faas-cli-darwin faas-cli-darwin-arm64 -faas-cli-armhf faas-cli.exe faas-cli-arm64 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 087662f74..3cba75515 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,7 +56,7 @@ To build the release binaries type in: ./extract_binaries.sh ``` -This creates the faas-cli for Mac, Windows, Linux x64, Linux ARMHF and Linux ARM64. +This creates the faas-cli for Mac, Windows, Linux x64 and Linux ARM64. * The project manages dependencies using Go modules and the `vendor/` folder. When updating a dependency you must run diff --git a/Dockerfile.redist b/Dockerfile.redist index d7f0f7b6a..a88dfdd5f 100644 --- a/Dockerfile.redist +++ b/Dockerfile.redist @@ -55,13 +55,6 @@ RUN CGO_ENABLED=0 GOOS=windows go build --ldflags "-s -w \ -X github.com/openfaas/faas-cli/commands.Platform=x86_64" \ -o faas-cli.exe -FROM builder as arm -RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build --ldflags "-s -w \ - -X github.com/openfaas/faas-cli/version.GitCommit=${GIT_COMMIT} \ - -X github.com/openfaas/faas-cli/version.Version=${VERSION} \ - -X github.com/openfaas/faas-cli/commands.Platform=armhf" \ - -o faas-cli-armhf - FROM builder as arm64 RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build --ldflags "-s -w \ -X github.com/openfaas/faas-cli/version.GitCommit=${GIT_COMMIT} \ @@ -83,7 +76,6 @@ WORKDIR /home/app COPY --from=linux /go/src/github.com/openfaas/faas-cli/faas-cli . COPY --from=darwin /go/src/github.com/openfaas/faas-cli/faas-cli-darwin . COPY --from=darwin-arm64 /go/src/github.com/openfaas/faas-cli/faas-cli-darwin-arm64 . -COPY --from=arm /go/src/github.com/openfaas/faas-cli/faas-cli-armhf . COPY --from=windows /go/src/github.com/openfaas/faas-cli/faas-cli.exe . COPY --from=arm64 /go/src/github.com/openfaas/faas-cli/faas-cli-arm64 . diff --git a/Makefile b/Makefile index a15df6691..f1893d1bf 100644 --- a/Makefile +++ b/Makefile @@ -65,14 +65,6 @@ dist: test-unit: go test $(shell go list ./... | grep -v /vendor/ | grep -v /template/ | grep -v build) -cover -.PHONY: ci-armhf-push -ci-armhf-push: - (docker push openfaas/faas-cli:$(TAG)-armhf && docker push openfaas/faas-cli:$(TAG)-root-armhf) - -.PHONY: ci-armhf-build -ci-armhf-build: - (./build.sh $(TAG)-armhf) - .PHONY: ci-arm64-push ci-arm64-push: (docker push openfaas/faas-cli:$(TAG)-arm64 && docker push openfaas/faas-cli:$(TAG)-root-arm64) diff --git a/build_integration_test.sh b/build_integration_test.sh index 898dfad71..474e49076 100755 --- a/build_integration_test.sh +++ b/build_integration_test.sh @@ -23,13 +23,6 @@ get_package() { ;; esac ;; - "Linux") - case $arch in - "armv6l" | "armv7l") - cli="./faas-cli-armhf" - ;; - esac - ;; esac echo "Using package $cli" diff --git a/commands/local_run_resources.go b/commands/local_run_resources.go index 414b89ea6..5bd2e8415 100644 --- a/commands/local_run_resources.go +++ b/commands/local_run_resources.go @@ -136,7 +136,7 @@ func negativeMemoryError(value string) error { func oversizedMemoryError(value string) error { // Typed as int64 so the constant does not take its default type of int, - // which overflows when cross-compiling for a 32-bit target such as armhf. + // which would overflow when building for a 32-bit target. return fmt.Errorf("invalid memory value %q: must be under %d bytes", value, int64(math.MaxInt64)) } diff --git a/extract_binaries.sh b/extract_binaries.sh index 95e96636b..294216e15 100755 --- a/extract_binaries.sh +++ b/extract_binaries.sh @@ -15,7 +15,6 @@ docker create --name faas-cli openfaas/faas-cli:${eTAG} && \ docker cp faas-cli:/home/app/faas-cli ./bin && \ docker cp faas-cli:/home/app/faas-cli-darwin ./bin && \ docker cp faas-cli:/home/app/faas-cli-darwin-arm64 ./bin && \ - docker cp faas-cli:/home/app/faas-cli-armhf ./bin && \ docker cp faas-cli:/home/app/faas-cli-arm64 ./bin && \ docker cp faas-cli:/home/app/faas-cli.exe ./bin && \ docker rm -f faas-cli diff --git a/npm/lib.js b/npm/lib.js index 0063f68cd..dcabf75ed 100644 --- a/npm/lib.js +++ b/npm/lib.js @@ -18,10 +18,6 @@ module.exports = { if (arch === 'aarch64') { return '-arm64'; } - - if (arch === 'armv61' || arch === 'armv71') { - return '-armhf' - } } if (type === 'Darwin') { diff --git a/npm/test.js b/npm/test.js index 9d4048e45..733ab90ec 100644 --- a/npm/test.js +++ b/npm/test.js @@ -14,13 +14,9 @@ describe('Platform Suffix', function () { let result = lib.getSuffix('Linux', 'aarch64'); assert.equal(result, '-arm64', `Expected '-arm64', but got: ${result}`); }); - it('should return -armhf for Linux armv61', function () { - let result = lib.getSuffix('Linux', 'armv61'); - assert.equal(result, '-armhf', `Expected '-armhf', but got: ${result}`); - }); - it('should return -armhf for Linux armv71', function () { - let result = lib.getSuffix('Linux', 'armv71'); - assert.equal(result, '-armhf', `Expected '-armhf', but got: ${result}`); + it('should throw for 32-bit Arm, which is no longer published', function () { + assert.throws(() => {lib.getSuffix('Linux', 'armv61')}); + assert.throws(() => {lib.getSuffix('Linux', 'armv71')}); }); it('should return -darwin for MacOS', function () { let result = lib.getSuffix('Darwin', ''); From 98a9da681ce93cceca8a6731765b9a0a9a5c5ccb Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Fri, 24 Jul 2026 15:48:05 +0100 Subject: [PATCH 2/2] Build the redistributable binaries on every push The Windows, macOS and Arm binaries are cross-compiled inside Dockerfile.redist, which until now was only built by the publish workflow. A compile error affecting one of those targets and not linux/amd64 was therefore invisible until a tag was pushed, and the first sign of it was a failed release. Build the same target in the build workflow so those errors surface on the commit that introduces them. The image is not loaded or pushed, it is compiled and discarded. Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- .github/workflows/build.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 511bd92fa..c7faea9f4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -55,7 +55,22 @@ jobs: GIT_COMMIT=${{ github.sha }} REPO_URL=https://github.com/openfaas/faas-cli tags: openfaas/faas-cli:${{ github.sha }} - - + - + name: Test the redistributable binaries cross-compile + uses: docker/build-push-action@v7 + with: + context: . + file: ./Dockerfile.redist + push: false + load: false + platforms: linux/amd64 + target: release + build-args: | + VERSION=latest-dev + GIT_COMMIT=${{ github.sha }} + REPO_URL=https://github.com/openfaas/faas-cli + tags: openfaas/faas-cli-redist:${{ github.sha }} + - name: Copy binary to host run: | docker create --name faas-cli openfaas/faas-cli:${{ github.sha }} && \