Skip to content

Conversation

@mingshi-wang
Copy link
Contributor

The "airflow dag trigger" reports a harmless yet annoying warning message "Calling DAG.create_dagrun() without an explicit data interval is deprecated". The issue can be fixed by setting the create_dagrun function argument data_interval to the same value as is calculated by the function.

closes: #20579

^ 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.

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Jan 10, 2022
@mingshi-wang mingshi-wang changed the title Fix airflow trigger cli Fix airflow dag trigger cli Jan 10, 2022
Copy link
Member

@uranusjr uranusjr Jan 10, 2022

Choose a reason for hiding this comment

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

execution_date is never None and already aware at this point, so pendulum.instance() is probably a better call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated as suggested.

Copy link
Member

Choose a reason for hiding this comment

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

This should be checkable, can you try to not use ANY here (and the one below)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. I also updated the test to check the value of "dag_hash".

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Jan 10, 2022
@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API okay to merge It's ok to merge this PR as it does not require more tests type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Airflow 2.2.3 : "airflow dags trigger" command gets "Calling DAG.create_dagrun() without an explicit data interval is deprecated"

4 participants