Split airflowctl dags state argument into run_id and --logical-date#69915
Draft
FrankYang0529 wants to merge 1 commit into
Draft
Split airflowctl dags state argument into run_id and --logical-date#69915FrankYang0529 wants to merge 1 commit into
FrankYang0529 wants to merge 1 commit into
Conversation
Signed-off-by: PoAn Yang <payang@apache.org>
72be3ef to
6cae126
Compare
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
airflow dags stateused single fieldlogical_date_or_run_idfor two different values. Theairflowctl dags stateinherited it.logical_date, it spends an extra request trying it as arun_idfirst. That request is bound to 404, and the CLI then uses the list API to retrieve thedag_run. An unknownrun_idhas a similar issue: the 404 is followed by a list call issued only to check that the Dag exists.How
--logical-dateand makerun_idan optional positional. Exactly one of the two is required.run_idgoes straight todag_runs.getand--logical-dategoes todag_runs.list.Verification
uv run --project airflow-ctl pytest airflow-ctl/tests/airflow_ctl/ctl/commands/test_dag_command.py airflow-ctl/tests/airflow_ctl/api/test_operations.pyWas generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.