-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
[AIRFLOW-7000] Allow passing in env var JSON dict in task_test #7639
Conversation
8613b17
to
0c0627f
Compare
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.
This would be very useful 👍
airflow/cli/commands/task_command.py
Outdated
@@ -320,6 +320,12 @@ def task_test(args, dag=None): | |||
if not already_has_stream_handler: | |||
logging.getLogger('airflow.task').propagate = True | |||
|
|||
env_vars = {'AIRFLOW_TEST_MODE'} |
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.
Why do we need AIRFLOW_TEST_MODE
?
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.
This is more to share AIRFLOW_TEST_MODE
across all executions and provide a convinient default env var for people too lazy to specify the cli param. It's the most common one that we use( to differ dev env from prod env). Do you think it would be useful?
b09b333
to
f85ac05
Compare
f85ac05
to
054ce30
Compare
:( Travis is sad:
|
054ce30
to
6d732b6
Compare
Co-authored-by: Haim Grosman <haim.grosman@airbnb.com>
6d732b6
to
93fbc6e
Compare
@kaxil ya somehow the stdout capture in bash operator works only after the first test run... Reverted back to PythonOperator that other tests are using and we all green :D |
Issue link: AIRFLOW-7000
AIRFLOW_TEST_MODE
for allairflow test
executionsMake sure to mark the boxes below before creating PR: [x]
[AIRFLOW-NNNN]
. AIRFLOW-NNNN = JIRA ID** For document-only changes commit message can start with
[AIRFLOW-XXXX]
.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.
Read the Pull Request Guidelines for more information.