Skip to content

Conversation

@dheerajturaga
Copy link
Member

@dheerajturaga dheerajturaga commented Dec 2, 2025

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 edit
xcom.uodated.mp4

Copy link
Member

@jason810496 jason810496 left a 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.

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.

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.

@bbovenzi bbovenzi added this to the Airflow 3.2.0 milestone Dec 4, 2025
@bbovenzi
Copy link
Contributor

bbovenzi commented Dec 4, 2025

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)

@dheerajturaga
Copy link
Member Author

dheerajturaga commented Dec 5, 2025

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.
There maybe countless other usecases where you may want to modify the xcoms and the only method today to modify them is to use the airflow python client.

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

@dheerajturaga dheerajturaga force-pushed the feat/xcom-edit-add-delete branch 3 times, most recently from 442c634 to d808058 Compare December 5, 2025 20:48
@dheerajturaga
Copy link
Member Author

@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)

@dheerajturaga dheerajturaga force-pushed the feat/xcom-edit-add-delete branch from d808058 to 8d5efec Compare December 7, 2025 10:21
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.

Do you mind rebasing and fixing the conflicts so we can merge this.

LGTM

@dheerajturaga dheerajturaga force-pushed the feat/xcom-edit-add-delete branch from 8d5efec to 4bb5705 Compare December 12, 2025 04:55
Copy link
Member

@jason810496 jason810496 left a 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.

@dheerajturaga dheerajturaga force-pushed the feat/xcom-edit-add-delete branch from 869ada6 to 5852ba2 Compare December 13, 2025 19:11
@dheerajturaga
Copy link
Member Author

@pierrejeambrun CI failure seems unrelated?

Copy link
Member

@jason810496 jason810496 left a 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.

@dheerajturaga dheerajturaga force-pushed the feat/xcom-edit-add-delete branch from 5852ba2 to 08a61bd Compare December 14, 2025 15:23
  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.
@dheerajturaga dheerajturaga force-pushed the feat/xcom-edit-add-delete branch from 08a61bd to b87e1a9 Compare December 15, 2025 21:19
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.

Merging. Unrelated CI failure, and for some reason I cannot rebase the PR.

Screenshot 2025-12-16 at 18 12 07

@pierrejeambrun pierrejeambrun merged commit 7ba8dbf into apache:main Dec 16, 2025
122 of 123 checks passed
FoxHelms pushed a commit to FoxHelms/airflow that referenced this pull request Dec 17, 2025
…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
Lohith625 pushed a commit to Lohith625/airflow that referenced this pull request Dec 19, 2025
…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
@jscheffl
Copy link
Contributor

jscheffl commented Dec 20, 2025

While testing UI translations I found two glitches:

  1. XCom changes are NOT possible when using FabAuth manager, only when using SimpleAuthMgr. Is some extension in permission model needed to make it working?
  2. The Expand/Collapse buttons having a bad translation key, fixing in PR Fix Expand+Collapse Translation Key #59672

When I use the new UI with FabAuthManager I get a HTTP 403 Forbidden when edit/delete/create:

image image

@pierrejeambrun
Copy link
Member

pierrejeambrun commented Jan 8, 2026

Good catch I'll open a PR for 1

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:translations area:UI Related to UI/UX. For Frontend Developers. translation:default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants