Skip to content

projects: Build a build image for Python functions - #588

Merged
adamwg merged 1 commit into
crossplane:mainfrom
adamwg:awg/python-build-image
Nov 23, 2026
Merged

adamwg merged 1 commit into
crossplane:mainfrom
adamwg:awg/python-build-image

Conversation

@adamwg

@adamwg adamwg commented Nov 23, 2026

Copy link
Copy Markdown
Member

Description of your changes

Previously, our build image for Python functions was a stock Debian container, which meant we had to install the Python toolchain as part of every build. This is slow and breaks in environments where users can't access the Debian package repositories.

Create a simple build image by installing the necessary Python tools into the same Debian image we used before. Add a CI job to update the image when the Dockerfile changes. Since we're using a digest for the base (upstream Debian) image, Renovate will update the Dockerfile for us, triggering a new image build. A new base image build will trigger Renovate to update the version in images.yaml, so we get automatic updates with manual approval (and existing versions of the CLI won't have their base image change unexpectedly).

Ref #437

I have:

  • Read and followed Crossplane's contribution process.
  • Read and followed Crossplane's AI policy and confirmed a human stands behind this PR.
    - [ ] Run ./nix.sh flake check to ensure this PR is ready for review.
    - [ ] Added or updated unit tests.
    - [ ] Linked a PR or a docs tracking issue to document this change.
    - [ ] Added backport release-x.y labels to auto-backport this PR.

Previously, our build image for Python functions was a stock Debian container,
which meant we had to install the Python toolchain as part of every build. This
is slow and breaks in environments where users can't access the Debian package
repositories.

Create a simple build image by installing the necessary Python tools into the
same Debian image we used before. Add a CI job to update the image when the
Dockerfile changes. Since we're using a digest for the base (upstream Debian)
image, Renovate will update the Dockerfile for us, triggering a new image
build. A new base image build will trigger Renovate to update the version in
images.yaml, so we get automatic updates with manual approval (and existing
versions of the CLI won't have their base image change unexpectedly).

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
@adamwg
adamwg requested review from a team, jcogilvie and tampakrap as code owners November 23, 2026 20:39
@adamwg
adamwg requested review from negz and removed request for a team November 23, 2026 20:39
@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.23%. Comparing base (7e8f0c9) to head (b2d6aa9).
⚠️ Report is 1 commits behind head on main.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adamwg
adamwg merged commit 13c42d7 into crossplane:main Nov 23, 2026
13 checks passed
@adamwg
adamwg deleted the awg/python-build-image branch November 23, 2026 21:08
@adamwg adamwg mentioned this pull request Nov 23, 2026
3 tasks done
adamwg added a commit that referenced this pull request Nov 23, 2026
Use the image we built in #588 as the Python build image. Renovate should keep
it up-to-date going forward.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
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.

2 participants