Skip to content

Commit

Permalink
Mount selected sources of Airflow to image when running mypy checks (#…
Browse files Browse the repository at this point in the history
…36038)

When Mypy runs its check it uses breeze image to do so, and by
default on CI the images are built using `main` version of scripts/ci
and workflow files. This basically means that running static checks with
the breeze image reguies mounting the sources if we want to run those
checks on the scripts/ci/ folder or .workflow and breeze CI image is
used.

The `mypy-dev` check is doing it - it checks `scripts/ci` folder,
which means that for mypy checks we need to force mounting the
selected sources rather than the ones that are baked in the image.
  • Loading branch information
potiuk authored Dec 4, 2023
1 parent 55eac5e commit 0953e0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/ci/pre_commit/pre_commit_mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
warn_image_upgrade_needed=True,
extra_env={
"INCLUDE_MYPY_VOLUME": "true",
# Need to mount local sources when running it - to not have to rebuild the image
# and to let CI work on it when running on PRs from forks - because mypy-dev uses files
# that are not available at the time when image is built in CI
"MOUNT_SOURCES": "selected",
},
)
if res.returncode != 0:
Expand Down

0 comments on commit 0953e0f

Please sign in to comment.