Skip to content

fix(k8s_apps): build release-workflow images with OUTPUT_OCI - #6282

Merged
feoh merged 2 commits into
mainfrom
fix/release-workflow-output-oci
Oct 7, 2026
Merged

feoh merged 2 commits into
mainfrom
fix/release-workflow-output-oci

Conversation

@feoh

@feoh feoh commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

What are the relevant tickets?

N/A. Follow-up to #6248, which broke build-micromasters-image-from-master.

Description (What does it do?)

Without this, any app on the release-resource workflow that builds FROM mitodl/ol-python-base pushes its DHI zstd layers labeled as gzip. The put step's implicit get then fails:

fetching mitodl/micromasters-app@sha256:fd3befc1dfbfbbaa780687a7fa38da0c4ffa4f56f2374d1e0999f8694b3ee8fc
ERRO download failed: write rootfs: extract image: gzip: invalid header

Currently failing this way:

Implementation details

In the manifest that build #2 pushed, every layer is typed application/vnd.docker.image.rootfs.diff.tar.gzip. But the first five blobs start with the zstd magic number 28b52ffd, not gzip's 1f8b. They're the same blobs that mitodl/ol-python-base:3.11 correctly declares as application/vnd.oci.image.layer.v1.tar+zstd.

oci-build-task's default Docker-format tarball has no zstd media type, so those layers keep their bytes but get relabeled as gzip. OUTPUT_OCI keeps the original labels. With it set, oci-build-task writes an OCI layout directory at image/image, so the put image param changes to match.

ol-analytics-api is also on this workflow. It doesn't build from ol-python-base, and its builds have been passing; with this change it picks up OCI output too.

How can this be tested?

  • New tests/ol_concourse/test_k8s_apps_output_oci.py checks that micromasters' main and release image jobs set OUTPUT_OCI and push image/image. Both tests fail on main (KeyError: 'OUTPUT_OCI') and pass on this branch. All 414 tests in tests/ol_concourse pass.
  • Compared the generated micromasters pipeline with the deployed micromasters-pipeline (fly get-pipeline). Only the two build jobs change: each gains OUTPUT_OCI: "true", and its puts switch from image/image.tar to image/image. The set of jobs is identical.
  • After merge, once k8s-apps-meta re-sets the pipelines, re-run build-micromasters-image-from-master and build-learn-ai-release-image. Both should get past the put step's implicit get.

The release-resource workflow's image jobs (_build_image_job and
_build_release_image_job) were missing the OUTPUT_OCI fix that #5722 added
to the legacy path. Images built FROM mitodl/ol-python-base carry zstd
layers from the DHI base; oci-build-task's default Docker-format tarball
labels them gzip, so the registry-image put's implicit get fails with
"gzip: invalid header". This broke micromasters' first build after #6248
and learn-ai's release image build.

Set OUTPUT_OCI and push the image/image layout directory, keeping the
tarball only when uploading Sentry source maps, as the legacy path does.
Copilot AI balanced review requested due to automatic review settings October 7, 2026 18:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Sentry tarball exception lacks regression coverage.

1 open finding
What changed in this PR

Adds OCI output support to release-resource image builds, preserving zstd layer metadata.

Changes:

  • Enables OUTPUT_OCI and pushes OCI layout directories.
  • Retains tarball output for Sentry source-map builds.
  • Adds regression coverage for standard image builds.
File Description
pipeline.py Configures OCI output and matching registry paths.
test_k8s_apps_output_oci.py Tests OCI parameters and image paths.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/ol_concourse/test_k8s_apps_output_oci.py
A release image build that uploads Sentry source maps must skip OUTPUT_OCI
and push image/image.tar, since the upload reads the unpacked rootfs.
@feoh
feoh merged commit 8023d45 into main Oct 7, 2026
10 checks passed
@feoh
feoh deleted the fix/release-workflow-output-oci branch October 7, 2026 18:57
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.

3 participants