Skip to content

Fix Python version extraction regex for docker-borgmatic Dockerfile - #75

Merged
modem7 merged 1 commit into
masterfrom
fix/dockerfile-python-version-regex
Jul 19, 2026
Merged

Fix Python version extraction regex for docker-borgmatic Dockerfile#75
modem7 merged 1 commit into
masterfrom
fix/dockerfile-python-version-regex

Conversation

@modem7

@modem7 modem7 commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • The setup job's "Fetch Python version from docker-borgmatic Dockerfile" step is failing on master and on Update dependency borgbackup to v1.4.5 #74 with Process completed with exit code 1.
  • Root cause: the URL fix in 3d66052 corrected the path (docker-borgmatic moved its Dockerfile out of base-fullbuild/), but docker-borgmatic's Dockerfile also changed how it declares the Python version — it now uses ARG PYTHON_VERSION=3.14 + FROM python:${PYTHON_VERSION}-alpine... instead of a literal FROM python:X.Y. The old regex (?<=FROM python:)\d+\.\d+ no longer matches anything, grep exits 1, and the step dies under bash -e.
  • Fix: extract the version from the ARG PYTHON_VERSION= line instead.

Test plan

  • Verified locally against the live Dockerfile: curl -s https://raw.githubusercontent.com/modem7/docker-borgmatic/master/Dockerfile | grep -oP '(?<=^ARG PYTHON_VERSION=)\d+\.\d+' returns 3.14
  • CI passes on this PR
  • Update dependency borgbackup to v1.4.5 #74 rebased onto master picks up this fix and goes green

docker-borgmatic's Dockerfile now sets the Python version via
ARG PYTHON_VERSION instead of hardcoding it in the FROM line, so the
old regex matched nothing and failed the setup job (exit 1 under
bash -e).
@modem7
modem7 merged commit af37742 into master Jul 19, 2026
7 checks passed
@modem7
modem7 deleted the fix/dockerfile-python-version-regex branch July 20, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant