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: Port _validate_inlet_outlet_assets_activeness into Task SDK #46020

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amoghrajesh
Copy link
Contributor


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

@amoghrajesh
Copy link
Contributor Author

Need to work on few things:

  1. Fix the task runner tests
  2. Add tests for supervisor
  3. Revisit the # type: ignore checks -> added some cos it felt easier.
  4. Add PR description with plenty of details.

task_instance = session.scalar(select(TI).where(TI.id == ti_id_str))
if task_instance.state != State.RUNNING:
return Response(status_code=status.HTTP_204_NO_CONTENT)
else:
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Since the if block returns there is no need for the else.

As a general rule if you can have something less indented it is better. (Or to put it another way, the deeper nested the code is, the more complex it is.)

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

Successfully merging this pull request may close these issues.

2 participants