From 4695bd08b741c10fec507a8fcc9f30febc706a1f Mon Sep 17 00:00:00 2001 From: pat-s Date: Wed, 13 May 2026 16:48:08 +0200 Subject: [PATCH] fix: stabilize alpine CI steps - Fetch R version from Homebrew JSON API with jq instead of scraping the raw formula (was silently producing an empty version file that propagated to downstream steps). - Replace grep -oP with grep -oE in the S3 listing step; BusyBox grep in the alpine image has no Perl-regex support. - Add ephemeral-storage requests/limits to the Build step so the docker-cli apk extract doesn't fail with I/O errors under node disk pressure. --- .crow/build.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.crow/build.yaml b/.crow/build.yaml index b983a45..162c3ae 100644 --- a/.crow/build.yaml +++ b/.crow/build.yaml @@ -90,8 +90,8 @@ steps: - name: Get latest R version image: reg.devxy.io/docker.io/library/alpine:3.23 commands: - - apk add -q --no-cache curl - - curl -s https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/r/r.rb | grep -o 'R-[0-9]*\.[0-9]*\.[0-9]*' | tr -d 'R-' | tr -d '"' | head -n 1 > r-version-to-build.txt + - apk add -q --no-cache curl jq + - curl -sf https://formulae.brew.sh/api/formula/r.json | jq -er '.versions.stable' > r-version-to-build.txt # - echo "4.1.3" > r-version-to-build.txt - cat r-version-to-build.txt backend_options: @@ -114,7 +114,7 @@ steps: - | VERSION=$(cat r-version-to-build.txt) curl -s "https://s3.eu-central-003.backblazeb2.com/devxy-r-builds?prefix=${PLATFORM_ID}/" | \ - grep -oP '[^<]+' | sed 's/<[^>]*>//g' | \ + grep -oE '[^<]+' | sed 's/<[^>]*>//g' | \ awk -v arch="${ARCH_ID}" -v ver="${VERSION}" \ '$0 ~ arch && $0 ~ ver {print substr($NF, 3, 5)}' > r-version-s3.txt - cat r-version-s3.txt @@ -142,9 +142,11 @@ steps: requests: memory: 200Mi cpu: 500m + ephemeral-storage: 2Gi limits: memory: 1000Mi cpu: 4000m + ephemeral-storage: 4Gi nodeSelector: kubernetes.io/arch: "${ARCH}"