-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use dag_maker
fixture in models/test_taskinstance.py
#17425
Use dag_maker
fixture in models/test_taskinstance.py
#17425
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
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. |
1b99c4f
to
da6de91
Compare
b83588f
to
ad5d257
Compare
63f7055
to
4594b5d
Compare
@@ -480,6 +480,7 @@ def __call__(self, dag_id='test_dag', session=None, **kwargs): | |||
self.start_date = DEFAULT_DATE | |||
self.kwargs['start_date'] = self.start_date | |||
self.dag = DAG(dag_id, **self.kwargs) | |||
self.dag.fileloc = request.module.__file__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice and easy :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the idea!
579032e
to
bc5a3c8
Compare
The change applies dag_maker fixture in test_taskinstance.py fixup! Use `dag_maker` fixture in models/test_taskinstance.py Update tests/models/test_taskinstance.py Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com> fixup! Update tests/models/test_taskinstance.py fixup! fixup! Update tests/models/test_taskinstance.py fixup! Use `dag_maker` fixture in models/test_taskinstance.py Use dag_maker on test_render_k8s_pod_yaml use inspect to get dag_maker module Set dag_maker file location to caller Fix pre-commit
bc5a3c8
to
b396c68
Compare
This test is flaky in the CI |
The change applies dag_maker fixture in test_taskinstance.py
^ 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.