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

AIP-72: Improve Supervisor and Task Instance State Validation #44405

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

kaxil
Copy link
Member

@kaxil kaxil commented Nov 27, 2024

This commit adds test that Supervisor prevents starting a Task Instance that is already running. Also updated test_ti_update_state_conflict_if_not_queued to use parameterized states, covering all non-queued Task Instance states.

This is part of my efforts to port LocalTaskJob tests to Supervisor: #44356.

This ports over TestLocalTaskJob.test_localtaskjob_double_trigger


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

This commit adds test that Supervisor prevents starting a Task Instance that is already running. Also updated `test_ti_update_state_conflict_if_not_queued` to use parameterized states, covering all non-queued Task Instance states.

This is part of my efforts to port LocalTaskJob tests to Supervisor: apache#44356.

This ports over `TestLocalTaskJob.test_localtaskjob_double_trigger`
@kaxil kaxil added the area:task-execution-interface-aip72 AIP-72: Task Execution Interface (TEI) aka Task SDK label Nov 27, 2024
@kaxil kaxil requested a review from ashb November 27, 2024 01:35
Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

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

LGTM

@kaxil kaxil merged commit b1a44b4 into apache:main Nov 27, 2024
47 checks passed
@kaxil kaxil deleted the handle-already-running-task branch November 27, 2024 12:13
@ashb
Copy link
Member

ashb commented Nov 27, 2024

Oh, it might be worth extending this to check that the task code itself is never actually invoked? I'm not quite sure how we might do that across the subprocess though

ArshiaZr pushed a commit to ArshiaZr/airflow that referenced this pull request Nov 27, 2024
LefterisXefteris pushed a commit to LefterisXefteris/airflow that referenced this pull request Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:task-execution-interface-aip72 AIP-72: Task Execution Interface (TEI) aka Task SDK area:task-sdk
Development

Successfully merging this pull request may close these issues.

4 participants