Skip to content

Api endpoint update ti - #26165

Merged
potiuk merged 27 commits into
apache:mainfrom
cedkoffeto:api-endpoint-update-ti
Oct 31, 2022
Merged

potiuk merged 27 commits into
apache:mainfrom
cedkoffeto:api-endpoint-update-ti

Conversation

@cedkoffeto

Copy link
Copy Markdown
Contributor

This PR adds a patch method for these two endpoints for updating a single task instance status

  • /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}
  • /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index}

closes: #23246
related: #23227


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

@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Sep 5, 2022
@boring-cyborg

boring-cyborg Bot commented Sep 5, 2022

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

@cedkoffeto

cedkoffeto commented Sep 5, 2022 •

Copy link
Copy Markdown
Contributor Author

Hi @mik-laj @ephraimbuddy
Am writing tests but I just wanted your feedback about adding patch method to the specified endpoints (does it seems to be the best way for you)
Tks

@uranusjr

uranusjr commented Sep 8, 2022

Copy link
Copy Markdown
Member

This also needs some tests.

@cedkoffeto
cedkoffeto requested review from uranusjr and removed request for ephraimbuddy and mik-laj September 17, 2022 13:15
@cedkoffeto

Copy link
Copy Markdown
Contributor Author

Hi, @uranusjr can you check my changes, please? thank you.

@potiuk

potiuk commented Sep 22, 2022

Copy link
Copy Markdown
Member

FYI. TP was on vacations - but before he gets here, I think if you reabase and fix failing static checks @cedkoffeto

@Bowrna

Bowrna commented Oct 3, 2022

Copy link
Copy Markdown
Contributor

there are few static checks failing in the CI pipeline too @cedkoffeto

@cedkoffeto

Copy link
Copy Markdown
Contributor Author

Hi @Bowrna year I will fix them soon I was a little busy these days

@eladkal eladkal added this to the Airflow 2.5.0 milestone Oct 16, 2022
@cedkoffeto

Copy link
Copy Markdown
Contributor Author

@ephraimbuddy plz can we close this PR or should I request a second review from @uranusjr

@ephraimbuddy ephraimbuddy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. See my comments

Comment on lines +1705 to +1709
response2 = self.client.get(
f"{self.ENDPOINT_URL}/1",
environ_overrides={'REMOTE_USER': "test"},
json={},
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this second request necessary? If it is, what's the meaning of the /1?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the update on this?

@cedkoffeto
cedkoffeto requested review from uranusjr and removed request for ashb, bbovenzi and ryanahamilton October 29, 2022 17:45
@uranusjr

Copy link
Copy Markdown
Member

Need to fix the static checks.

@potiuk
potiuk merged commit 1e6f1d5 into apache:main Oct 31, 2022
@boring-cyborg

boring-cyborg Bot commented Oct 31, 2022

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request!

@ephraimbuddy ephraimbuddy added the type:new-feature Changelog: New Features label Nov 16, 2022
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 type:new-feature Changelog: New Features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add api call for changing task instance status

6 participants