Skip to content

Fixes #38518: Fetch the Airflow base's MariaDB apt repo from dlm.mariadb.com in the ingestion images - #38519

Open
aydingeeringh wants to merge 3 commits into
open-metadata:mainfrom
aydingeeringh:fix/ingestion-mariadb-apt-source
Open

aydingeeringh wants to merge 3 commits into
open-metadata:mainfrom
aydingeeringh:fix/ingestion-mariadb-apt-source

Conversation

@aydingeeringh

@aydingeeringh aydingeeringh commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #38518

The Airflow base image installs its MariaDB client from https://archive.mariadb.org/mariadb-10.11/repo/debian. Since 2026-11-12 that URL redirects to the mirror.mariadb.org redirector. Some of the mirrors it picks redirect https to http, which apt refuses, so the first apt-get update in ingestion/Dockerfile.ci and ingestion/Dockerfile fails with "does not have a Release file". Whether it fails depends on where the build runs.

Before the first apt-get update, both Dockerfiles now rewrite that source to https://dlm.mariadb.com/repo/mariadb-server/<series>/repo/debian. That is the URL MariaDB's mariadb_repo_setup writes, and it serves the same repository over https only. The InRelease is byte-identical and signed by the key the base already trusts, and the base's o=MariaDB pin still applies. So the image gets the same 1:10.11.20+maria~deb12 packages that CI installs today. The apt-mark manual libpq5 libmariadb3 mariadb-common … step is unchanged.

The rewrite matches any mariadb-<version> path and any file in sources.list.d (one-line .list or deb822 .sources). That way it keeps working when the Airflow base moves to MariaDB 11.8, whose archive.mariadb.org path has the same redirect. If nothing matches, it does nothing.

Alternative considered: drop the MariaDB repo and use Debian's packages. That needs dpkg --purge --force-depends of the six MariaDB-repo packages the base ships, because the base pins o=MariaDB at 999 and Debian's libmariadb-dev needs an older libmariadb3. It would also replace 10.11.20 with Debian's 10.11.19 and drop Airflow's mariadb-client. That is a bigger change than a build-reliability fix needs.

Type of change:

  • Bug fix

High-level design:

N/A — small change (2 Dockerfiles, same 5-line step).

Tests:

Use cases covered

  • Building the ingestion images no longer depends on which MariaDB mirror the redirector picks.

Unit tests

Not applicable — Dockerfile-only change.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion code changes).

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

  1. Reproduced the failure in a container from apache/airflow:3.3.2-python3.12: apt-get update against the original MariaDB source failed 6 of 20 times with Redirection from https to 'http://…/mariadb-10.11.20/repo/debian/dists/bookworm/Release' is forbidden.
  2. With the rewritten source: 20 of 20 apt-get update runs succeeded. apt-cache policy libmariadb3 shows candidate 1:10.11.20+maria~deb12 at pin 999 from dlm.mariadb.com. A simulated install of the big dependency step resolves to the same MariaDB packages as today's green airflow-apis-tests run on main.
  3. docker build -f ingestion/Dockerfile.ci --build-arg INGESTION_DEPENDENCY=duckdb . (arm64) completes. In the final image, mariadb.list points at dlm.mariadb.com, and libmariadb3, mariadb-common and mysql-common are 1:10.11.20+maria~deb12 and marked manual. The -dev packages are purged, and import MySQLdb, psycopg2, metadata succeeds.
  4. ingestion/Dockerfile built through both of its apt steps: the source is rewritten, and libmariadb3 and libmariadb-dev are 1:10.11.20+maria~deb12. The full release build installs openmetadata-ingestion from PyPI by RI_VERSION, so it was not run from main.

UI screen recording:

Not applicable — build fix, no UI change.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #38518 above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: N/A.
  • For a UI feature or feature task: N/A — not a UI change.
  • I have added tests: N/A — Dockerfile change, verified by building the image (above).
  • Self-review: I reviewed the final diff against REVIEW.md.
  • Decision check: no record needed. The reason for the source rewrite is in the Dockerfile comment.

Backport: 2.1, 2.1.0 and 2.0 use the same base image and have the same first apt-get update.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Both ingestion Dockerfiles now rewrite MariaDB's archive URL to dlm.mariadb.com before the first apt-get update.

  • Both ingestion image builds update MariaDB's repository through a direct HTTPS URL.

Reviews (1) · Last reviewed commit: "Fetch the Airflow base's MariaDB apt rep..." · Reviewed by Greptile

… ingestion images

apache/airflow:3.3.2-python3.12 adds MariaDB's apt repo from
https://archive.mariadb.org/mariadb-10.11/repo/debian. Since MariaDB 10.11.20
that URL redirects to the mirror.mariadb.org redirector, and some mirrors it
picks redirect https to http, which apt refuses. The first apt-get update in
ingestion/Dockerfile and ingestion/Dockerfile.ci then fails with "does not have
a Release file", depending on where the build runs.

Rewrite the source to https://dlm.mariadb.com/repo/mariadb-server/<series>/repo/debian,
the URL MariaDB's mariadb_repo_setup writes. It serves the same InRelease, signed
by the key the base already trusts, so the o=MariaDB pin and the installed
packages are unchanged.
@aydingeeringh
aydingeeringh requested a review from a team as a code owner November 23, 2026 16:16
@aydingeeringh aydingeeringh changed the title Fixes 38518: Fetch the Airflow base's MariaDB apt repo from dlm.mariadb.com in the ingestion images Fixes #38518: Fetch the Airflow base's MariaDB apt repo from dlm.mariadb.com in the ingestion images Nov 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

Comment thread ingestion/Dockerfile Resolved
@Khairajani Khairajani added the safe to test Add this label to run secure Github workflows on PRs label Nov 25, 2026
@gitar-bot

gitar-bot Bot commented Nov 25, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findings

Redirecting ingestion image builds to MariaDB's direct HTTPS repository changes package retrieval; endpoint or layout problems could break dependency installation.

Rewrites the MariaDB apt source to https://dlm.mariadb.com/repo/mariadb-server/<series>/repo/debian in ingestion/Dockerfile.ci and ingestion/Dockerfile before the first apt-get update, so image builds no longer fail when the archive redirector picks an http mirror. The previously open note that the choice of MariaDB's repo over Debian's was unrecorded has been addressed by a comment in the Dockerfile.

✅ 1 closed
✅ Quality: Choice to keep MariaDB's apt repo over Debian's is not recorded

📄 ingestion/Dockerfile:17-22 📄 ingestion/Dockerfile.ci:15-20
The description makes a trade-off that docs/decisions/ does not record: "Dropping the MariaDB repo in favor of Debian's MariaDB packages, which would need forced purges and downgrades to 10.11.19, is not done", and the image "keeps installing the same 1:10.11.20+maria~deb12 packages from the MariaDB repo". The Dockerfile comment explains why dlm.mariadb.com replaces archive.mariadb.org. It does not say why the MariaDB repo stays, and this repository squash-merges, so that reasoning will be lost. Someone who later tidies up the extra repo could cause the forced downgrade this PR avoided. The record should say: "The ingestion images (ingestion/Dockerfile{,.ci}) keep the Airflow base's MariaDB apt repo and take MariaDB's packages from it. They rewrite the repo's archive.mariadb.org URL to dlm.mariadb.com before the first apt-get update, because some mirror.mariadb.org mirrors redirect https to http. Switching to Debian's MariaDB packages would need forced purges and a downgrade, so it is not done." It should also name the trigger for revisiting this, such as the base moving to MariaDB 11.8 or the mirrors being fixed.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ingestion image build fails at random: the Airflow base's MariaDB apt source redirects https to http

3 participants