-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Add ability to add, edit, and delete XComs directly from UI #58921
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
Add ability to add, edit, and delete XComs directly from UI #58921
Conversation
jason810496
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice feature!
LGTM on API side.
pierrejeambrun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR that's great!
A few suggestions to improve it.
Also in your video we can see a cache problem. You need to hard refresh the page to see the additional xcom value, update value, etc... You need to invalidate the query cache for xcoms on success of editXcom deleteXcom and createXcom.
You can take a look at useEditConnection for a similar behavior.
airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py
Outdated
Show resolved
Hide resolved
|
Help me understand the use case here. A user changes xcoms and then would want to rerun the task? I wonder how we keep the value types correct (string, number, json, etc) |
The usecase here is if the user decides to "mark task as success" , they would be also able to add required xcom results directly from the UI if the down stream tasks depend on it. I have updated my description with a video of examples of string, list and dict. All formats are working correctly. Let me know if you would like me to test anything else |
442c634 to
d808058
Compare
|
@potiuk I see Kubernetes unit tests failing. Is the CI broken or is this something related to my changes? (I dont expect it to be) |
d808058 to
8d5efec
Compare
pierrejeambrun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind rebasing and fixing the conflicts so we can merge this.
LGTM
airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py
Outdated
Show resolved
Hide resolved
8d5efec to
4bb5705
Compare
jason810496
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Approve for the API side.
Only the final nit about SQLAlchemy 2 syntax.
airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py
Outdated
Show resolved
Hide resolved
869ada6 to
5852ba2
Compare
|
@pierrejeambrun CI failure seems unrelated? |
jason810496
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI failure seems unrelated?
Yes, it seems to be flaky, I just ran those failed one again.
5852ba2 to
08a61bd
Compare
Add complete CRUD operations for XCom entries through the UI, enabling users to manage XComs without using API or CLI tools. This is especially important when manually marking task instances as success - users often need to add XComs to those tasks for downstream dependencies to proceed. This feature provides a significant productivity boost by eliminating context switching and manual API calls.
08a61bd to
b87e1a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…8921) * Add ability to add, edit, and delete XComs directly from UI Add complete CRUD operations for XCom entries through the UI, enabling users to manage XComs without using API or CLI tools. This is especially important when manually marking task instances as success - users often need to add XComs to those tasks for downstream dependencies to proceed. This feature provides a significant productivity boost by eliminating context switching and manual API calls. * Auto refresh on add/edit/delete by invalidating query cache * Common file for edit/add * Encapsulate button and modal into a single component * Handle special chars on delete for xcom key * Use getattr for rowcount to fix SQLAlchemy 2 MyPy compatibility
…8921) * Add ability to add, edit, and delete XComs directly from UI Add complete CRUD operations for XCom entries through the UI, enabling users to manage XComs without using API or CLI tools. This is especially important when manually marking task instances as success - users often need to add XComs to those tasks for downstream dependencies to proceed. This feature provides a significant productivity boost by eliminating context switching and manual API calls. * Auto refresh on add/edit/delete by invalidating query cache * Common file for edit/add * Encapsulate button and modal into a single component * Handle special chars on delete for xcom key * Use getattr for rowcount to fix SQLAlchemy 2 MyPy compatibility
|
While testing UI translations I found two glitches:
When I use the new UI with FabAuthManager I get a HTTP 403 Forbidden when edit/delete/create:
|
|
Good catch I'll open a PR for 1 |



Add complete CRUD operations for XCom entries through the UI, enabling
users to manage XComs without using API or CLI tools. This is especially
important when manually marking task instances as success - users often
need to add XComs to those tasks for downstream dependencies to proceed.
This feature provides a significant productivity boost by eliminating
context switching and manual API calls.
xcom.uodated.mp4