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

Migrate public endpoint Patch Task Instance to FastAPI #44223

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

omkar-foss
Copy link
Collaborator

@omkar-foss omkar-foss commented Nov 20, 2024

closes: #43753, #43754 and #43752
related: #42370

This migrates the Patch Task Instance API from api_connexion to api_fastapi.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Nov 20, 2024
@omkar-foss omkar-foss self-assigned this Nov 20, 2024
@omkar-foss omkar-foss added the legacy api Whether legacy API changes should be allowed in PR label Nov 20, 2024
@omkar-foss omkar-foss closed this Nov 20, 2024
@omkar-foss omkar-foss reopened this Nov 20, 2024
@omkar-foss omkar-foss marked this pull request as ready for review November 20, 2024 19:50
@omkar-foss
Copy link
Collaborator Author

All checks passed, PR is ready for review ✅

@omkar-foss
Copy link
Collaborator Author

@pierrejeambrun I'm adding the Set Task Instance Note functionality to this (Patch Task Instance) API as you mentioned here. Will update this PR in a while.

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

I think we need to include the update_mask as we do for other patch endpoints. (The state part would actually be the set_task_instance_state of your other PR)

@omkar-foss
Copy link
Collaborator Author

I think we need to include the update_mask as we do for other patch endpoints. (The state part would actually be the set_task_instance_state of your other PR)

@pierrejeambrun I've added update_mask here in this PR to Patch Task Instance API.

Yes got it, sure, I've closed the other Set Task Instance State PR #44246.

for field in fields_to_update:
if field == "new_state":
if not body.dry_run:
tis: list[TI] = dag.set_task_instance_state(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Are these to be included for updation as well? Let me know if required I'll add these too.

upstream=body.include_upstream,
downstream=body.include_downstream,
future=body.include_future,
past=body.include_past,
...

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:UI Related to UI/UX. For Frontend Developers. legacy api Whether legacy API changes should be allowed in PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AIP-84 Patch Task Instance
3 participants