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

Refactor DAG.create_dagrun() arguments #45370

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

uranusjr
Copy link
Member

@uranusjr uranusjr commented Jan 3, 2025

This aims to make the interface more straightforward, removing auto inference logic from the function. Most importantly, it is now entirely the caller site's responsibility to provide valid run_id and run_type values, instead of the function automatically inferring one from the other under certain conditions.

The main goal is to make changes simpler when we make logical date an optional (nullable) value. run_id generation is currently very heavily based on the logical date, and will need to be changed a bit when logical date is None. Removing logic should help us change the run_id generation logic easier.

p.s. not yet ready, many tests should fail.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:CLI area:dev-tools area:Scheduler including HA (high availability) scheduler area:webserver Webserver related Issues kind:documentation labels Jan 3, 2025
@uranusjr uranusjr added the legacy api Whether legacy API changes should be allowed in PR label Jan 3, 2025
@uranusjr uranusjr force-pushed the create-dagrun-refactor branch 2 times, most recently from a806c70 to 99e55bd Compare January 3, 2025 07:16
This aims to make the interface more straightforward, removing auto
inference logic from the function. Most importantly, it is now entirely
the caller site's responsibility to provide valid run_id and run_type
values, instead of the function automatically inferring one from the
other under certain conditions.

The main goal is to make changes simpler when we make logical date an
optional (nullable) value. run_id generation is currently very heavily
based on the logical date, and will need to be changed a bit when
logical date is None. Removing logic should help us change the run_id
generation logic easier.
We can have dag_version and run_type defaults since this is just for
tests and the actual values aren't that important most of the times.
@uranusjr uranusjr force-pushed the create-dagrun-refactor branch from aedee9c to 2628f0e Compare January 3, 2025 08:42
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 area:CLI area:dev-tools area:Scheduler including HA (high availability) scheduler area:webserver Webserver related Issues kind:documentation legacy api Whether legacy API changes should be allowed in PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant