-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Do not attempt to provide not stringified objects to UI via xcom if pickling is active #42388
Do not attempt to provide not stringified objects to UI via xcom if pickling is active #42388
Conversation
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.
Could you please add a test? :)
It would be great to instead have the React JSON view enabled for JSON-serializable Xcom values, and fall back to old logic otherwise. I can try taking a crack at that next week. |
3583fb5
to
de23033
Compare
Yeah. You can try. We can keep the PR open or you add another PR on top to improve. Unfortunately the JSON serialization is handled by the underlying framework such that the error is created post return. The only (simple) option that I see is to attempt a serialization and if this is OK then return is native, stryingify as fallback? But then the resulting object needs to be serialized multiple times. Mhm not really good. |
…ickling is active (apache#42388) * Do not attempt to provide not stringified objects to UI via xcom if pickling is active * Add pytest (cherry picked from commit f9877af)
…ickling is active (apache#42388) * Do not attempt to provide not stringified objects to UI via xcom if pickling is active * Add pytest
With this PR the xcom will always be returned as string if XCom pickling is active. Like it was in Airflow 2.9.
closes: #42117