Repository navigation
Fix Breeze --mount-sources tests not mounting local core tests - #74553
Open
sjyangkevin wants to merge 1 commit into
Open
sjyangkevin wants to merge 1 commit into
sjyangkevin wants to merge 1 commit into
Conversation
The tests mount mode lets developers iterate on their local tests while Airflow itself is installed from a package. The core tests entry pointed at a misspelled host folder, so the container kept the copy of airflow-core/tests baked into the CI image and silently ran it instead of the local edits. Docker also created an empty core-airflow/ folder in the repo root on every run.
sjyangkevin
marked this pull request as ready for review
October 11, 2026 01:34
sjyangkevin
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496,
jscheffl and
potiuk
as code owners
October 11, 2026 01:34
Contributor
Author
|
The CI failed due to following 503 will retry later. Could not pull cr.yandex/yc/yandex-docker-local-ydb:latest in 5 attempts. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's the issue
From my understanding,
breeze ... --mount-sources testsis meant to run local tests against an Airflow installed from a package. For core tests it seems doesn't, because the mount line inscripts/ci/docker-compose/tests-sources.ymlhas the folder name swapped:- ../../../core-airflow/tests/:/opt/airflow/core-airflow/tests:cachedAs a result:
/opt/airflow/airflow-core/testskeeps the copy baked into the CI image when it was built, and pytest runs that copy.core-airflow/testsfolder in the repo root, because the misspelled host path doesn't exist.When it was introduced
In #47798 (https://github.com/apache/airflow/pull/47798/changes#diff-c26b9fa407d8179ef67b1cbba03a643a4d8edee5760aae321c273f9b7327966c), which moved the core sources and tests into
airflow-core/. The old top-level../../../tests/:/opt/airflow/testsmount was rewritten and the two words got swapped. This line is the only place the name is spelled that way. It sits outside the block thegenerate-volumes-for-sourceshook regenerates, so nothing caught it.When it happens
It shows up when you run Breeze with
--mount-sources tests(which requires--use-airflow-version), for example to reproduce a provider compatibility run locally as described incontributing-docs/testing/unit_tests.rst, and either:airflow-core/tests, orairflow-core/teststhat every test run loads (unit/dags,unit/plugins,deprecations_ignore.yml), which affects provider tests too.What you might see then:
Not affected: CI (compatibility jobs use
--mount-sources remove), the defaultselectedmode, and provider test folders in this mode, which are mounted correctly.The fix
Correct the path so local
airflow-core/testsis mounted at/opt/airflow/airflow-core/tests, the same asproviders-and-tests-sources.ymlalready does:- ../../../airflow-core/tests/:/opt/airflow/airflow-core/tests:cachedThe pre-commit and manual prek hooks pass on the file, including yamllint and the Docker compose lint.
breeze verifylists no local tests for this change.Screenshots
breeze shell --use-airflow-version 3.3.2 --mount-sources tests --backend sqlite --python 3.11 \ "cat /opt/airflow/airflow-core/tests/unit/zz_mount_check.txt; ls -d /opt/airflow/core-airflow"Before (
main): the marker isn't visible in the container, and/opt/airflow/core-airflowis created, along withcore-airflow/testson the host.After (this PR): the marker is visible, and no stray folder is created.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines