You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Arbaaz123676 (via GitHub)" <gi...@apache.org> on 2026/03/03 16:27:34 UTC
[PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Arbaaz123676 opened a new pull request, #62798:
URL: https://github.com/apache/airflow/pull/62798
## Summary
This PR fixes an issue where the XCom value was not displayed when reopening the edit modal after updating it.
## Root Cause
The modal lifecycle and query behavior caused stale or skipped state updates when reopening the modal, leading to an empty value field.
## Changes
- Removed `lazyMount` from the dialog to ensure proper unmount/remount behavior.
- Enabled refetch on mount for the XCom entry query.
- Adjusted the population effect to rely on `data` instead of `data?.value !== undefined`.
- Ensured query invalidation for both `GetXcomEntries` and `GetXcomEntry` after update.
## Result
The XCom edit modal now consistently repopulates the latest value when reopened.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on code in PR #62798:
URL: https://github.com/apache/airflow/pull/62798#discussion_r2919298141
##########
airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx:
##########
@@ -113,13 +114,25 @@ const XComModal = ({ dagId, isOpen, mapIndex, mode, onClose, runId, taskId, xcom
type: "error",
});
},
- onSuccess: async () => {
+ onSuccess: async (response) => {
+ queryClient.setQueryData(
+ [
+ useXcomServiceGetXcomEntryKey,
+ {
+ dagId,
+ dagRunId: runId,
+ deserialize: true,
+ mapIndex,
+ stringify: false,
+ taskId,
+ xcomKey,
+ },
+ ],
+ response,
+ );
Review Comment:
This manually query setting is also incorrect. The response.value is always a string even if it is a date or json object.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #62798:
URL: https://github.com/apache/airflow/pull/62798#discussion_r2945652030
##########
airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx:
##########
@@ -58,6 +58,7 @@ const XComModal = ({ dagId, isOpen, mapIndex, mode, onClose, runId, taskId, xcom
dagRunId: runId,
deserialize: true,
mapIndex,
+ stringify: false,
Review Comment:
Nit.
Not needed, it defaults to false already.
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #62798:
URL: https://github.com/apache/airflow/pull/62798#issuecomment-4084849506
Awesome work, congrats on your first merged pull request! You are invited to check our [Issue Tracker](https://github.com/apache/airflow/issues) for additional contributions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #62798:
URL: https://github.com/apache/airflow/pull/62798#discussion_r2907202449
##########
airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx:
##########
@@ -113,13 +114,25 @@ const XComModal = ({ dagId, isOpen, mapIndex, mode, onClose, runId, taskId, xcom
type: "error",
});
},
- onSuccess: async () => {
+ onSuccess: async (response) => {
+ queryClient.setQueryData(
+ [
+ useXcomServiceGetXcomEntryKey,
+ {
+ dagId,
+ dagRunId: runId,
+ deserialize: true,
+ mapIndex,
+ stringify: false,
+ taskId,
+ xcomKey,
+ },
+ ],
+ response,
+ );
Review Comment:
Why are we changing this? Doesn't seem related.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #62798:
URL: https://github.com/apache/airflow/pull/62798#issuecomment-4084909711
### Backport failed to create: v3-1-test. View the failure log <a href='https://github.com/apache/airflow/actions/runs/23261363752'> Run details </a>
Note: As of [Merging PRs targeted for Airflow 3.X](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x)
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.
In matter of doubt please ask in [#release-management](https://apache-airflow.slack.com/archives/C03G9H97MM2) Slack channel.
<table>
<tr>
<th>Status</th>
<th>Branch</th>
<th>Result</th>
</tr>
<tr>
<td>❌</td>
<td>v3-1-test</td>
<td><a href="https://github.com/apache/airflow/commit/c438e2aa66d66c645ba2644d6ca1e26838632672"><img src='https://img.shields.io/badge/Commit-c438e2a-red' alt='Commit Link'></a></td>
</tr>
</table>
You can attempt to backport this manually by running:
```bash
cherry_picker c438e2a v3-1-test
```
This should apply the commit to the v3-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.
After you have resolved the conflicts, you can continue the backport process by running:
```bash
cherry_picker --continue
```
If you don't have cherry-picker installed, see the [installation guide](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#how-to-backport-pr-with-cherry-picker-cli).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun closed pull request #62798: Fix XCom edit modal value not repopulating on reopen.
URL: https://github.com/apache/airflow/pull/62798
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "Arbaaz123676 (via GitHub)" <gi...@apache.org>.
Arbaaz123676 commented on PR #62798:
URL: https://github.com/apache/airflow/pull/62798#issuecomment-4046914971
https://github.com/user-attachments/assets/8b66917d-b96a-471f-be36-c8e3a4d22556
@bbovenzi I have committed the required changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on PR #62798:
URL: https://github.com/apache/airflow/pull/62798#issuecomment-4084848661
Merging. CI failure is unrelated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi merged PR #62798:
URL: https://github.com/apache/airflow/pull/62798
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "Arbaaz123676 (via GitHub)" <gi...@apache.org>.
Arbaaz123676 commented on code in PR #62798:
URL: https://github.com/apache/airflow/pull/62798#discussion_r2908722631
##########
airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx:
##########
@@ -113,13 +114,25 @@ const XComModal = ({ dagId, isOpen, mapIndex, mode, onClose, runId, taskId, xcom
type: "error",
});
},
- onSuccess: async () => {
+ onSuccess: async (response) => {
+ queryClient.setQueryData(
+ [
+ useXcomServiceGetXcomEntryKey,
+ {
+ dagId,
+ dagRunId: runId,
+ deserialize: true,
+ mapIndex,
+ stringify: false,
+ taskId,
+ xcomKey,
+ },
+ ],
+ response,
+ );
Review Comment:
This updates the Query cache for a Airflow XCom entry using the API response after a successful request, so the UI updates immediately without refetching from the server.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "Arbaaz123676 (via GitHub)" <gi...@apache.org>.
Arbaaz123676 commented on PR #62798:
URL: https://github.com/apache/airflow/pull/62798#issuecomment-4027916963
https://github.com/user-attachments/assets/754f77ab-141d-4a62-91eb-4c76df24da8f
@pierrejeambrun It is working good on my end
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix XCom edit modal value not repopulating on reopen. [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on PR #62798:
URL: https://github.com/apache/airflow/pull/62798#issuecomment-4040187637
Looks to work. Let's just undo the onSuccess callback changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org