Skip to content
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

Merged

Conversation

ephraimbuddy
Copy link
Contributor

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.

Copy link
Member

@ashb ashb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@github-actions
Copy link

github-actions bot commented Aug 5, 2021

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.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Aug 5, 2021
@ephraimbuddy ephraimbuddy force-pushed the use-dag_maker-fixture-on-taskinstance branch from 1b99c4f to da6de91 Compare August 5, 2021 12:32
@ephraimbuddy ephraimbuddy marked this pull request as ready for review August 5, 2021 12:39
@ephraimbuddy ephraimbuddy force-pushed the use-dag_maker-fixture-on-taskinstance branch from b83588f to ad5d257 Compare August 5, 2021 14:01
@ephraimbuddy ephraimbuddy reopened this Aug 5, 2021
@ephraimbuddy ephraimbuddy force-pushed the use-dag_maker-fixture-on-taskinstance branch 2 times, most recently from 63f7055 to 4594b5d Compare August 6, 2021 10:14
@@ -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__
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the idea!

@ephraimbuddy ephraimbuddy force-pushed the use-dag_maker-fixture-on-taskinstance branch 4 times, most recently from 579032e to bc5a3c8 Compare August 6, 2021 23:36
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
@ephraimbuddy ephraimbuddy force-pushed the use-dag_maker-fixture-on-taskinstance branch from bc5a3c8 to b396c68 Compare August 8, 2021 10:52
@ephraimbuddy
Copy link
Contributor Author

This test is flaky in the CI TestSchedulerJob.test_add_unparseable_file_before_sched_start_creates_import_error, any ideas @potiuk

@ephraimbuddy ephraimbuddy merged commit ef1b124 into apache:main Aug 8, 2021
@ephraimbuddy ephraimbuddy deleted the use-dag_maker-fixture-on-taskinstance branch August 8, 2021 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full tests needed We need to run full set of tests for this PR to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants