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-84 Add ability to update dag run note in PATCH dag_run endpoint #43508

Merged

Conversation

rawwar
Copy link
Collaborator

@rawwar rawwar commented Oct 30, 2024

closes #43476

related to #42701

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Oct 30, 2024
@pierrejeambrun
Copy link
Member

pierrejeambrun commented Nov 5, 2024

I just pushed a new commit that should help you. Tests are green for test_patch_dag_run and both e75afb7.

The issue is coming session related and coming from the fact that methods such as set_dag_run_state_to_success are not updating the dag_run that we have in our context. Therefore we can do that beforehand, refetch the dag_run and then proceed to normal update.

Maybe we want to play around session=session, also commit=True is not actually committing to the db but only doing the modification, that's misleading but it is actually what we need. (1 commit per request to guarantee data integrity)

@rawwar rawwar marked this pull request as ready for review November 6, 2024 13:44
@pierrejeambrun
Copy link
Member

Thanks

@pierrejeambrun pierrejeambrun merged commit f57db71 into apache:main Nov 8, 2024
52 checks passed
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
…pache#43508)

* include dag_run_note in update_mask

* add dag run note

* state can be none

* add test

* Fix tests

* handle edge cases

* add tests

* remove joinedload

* fix update_mask checks

* fix tests

* fix

* remove async

* undo async

* fix

---------

Co-authored-by: pierrejeambrun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AIP-84 Add ability to update dag run note in PATCH dag_run endpoint
3 participants