Fix artifact for MyPy checks#23094
Conversation
|
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
Occasionally MyPy detects errors which have not been detected before. This is likely caused by having too many files passed to MyPY. If the number of files to pass to MyPy is too big, pre-commit will automatically split the list of files into several "mypy" commands. If we are unlucky the list of files will cause MyPy to detect slightly different errors. We split the mypy checks to be run separately for airflow core and airflow providers to limit the list of files to be shorter. We are also preparing for splitting off providers so this is good idea in general.
c3c8a95 to
922d1f7
Compare
|
Hey @ashb (one more comment) - I think I figured out why the MyPy "instability" happens and updated the PR to fix it permanently. I think it has to do with the number of files and the fact that it's semi-random how pre-commit splits files if it decides to split long list of files in two commands. This PR now makes the split "consistent" - it splits the files to check into "core" and "providers" buckets. Which sooner or later we will have to do anyway when/if we split repos. |
|
Ohh right yeah that would explain it! |
|
Passed static checks. Merging. |
Occasionally MyPy detects errors which have not been detected
before. This is likely caused by having too many files passed
to MyPY. If the number of files to pass to MyPy is too big,
pre-commit will automatically split the list of files into
several "mypy" commands. If we are unlucky the list of files
will cause MyPy to detect slightly different errors.
We split the mypy checks to be run separately for airflow core
and airflow providers to limit the list of files to be shorter.
We are also preparing for splitting off providers so this is
good idea in general.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.