Skip to content

Conversation

@olivermeyer
Copy link
Contributor

closes: #16386

Use the custom AirflowJsonEncoder when serializing a value for XCom.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I would love to have someone more familiar with the encoder to verify if there are no side effects ? Things like performance and some potential serialize/deserialize compatibility come to mind immmediately.

@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Jun 13, 2021
@olivermeyer
Copy link
Contributor Author

LGTM but I would love to have someone more familiar with the encoder to verify if there are no side effects ? Things like performance and some potential serialize/deserialize compatibility come to mind immmediately.

Thanks for reviewing. Do you know who is familiar with the encoder and could take a look?

Also, CI says The PR likely needs to run all tests! - is that the case? If yes, I'll amend and force-push. If not, is there a way to trigger CI without force-pushing? One of the tests failed but it passes locally so could be a transient error.

@potiuk
Copy link
Member

potiuk commented Jun 13, 2021

Thanks for reviewing. Do you know who is familiar with the encoder and could take a look?

Let's see who will chime in :). There are a few CODEOWNERS already added automatically so I guess one or few of those nice people will.

Also, CI says The PR likely needs to run all tests! - is that the case? If yes, I'll amend and force-push. If not, is there a way to trigger CI without force-pushing? One of the tests failed but it passes locally so could be a transient error.

Please rebase and push. This is pretty standard and you will likely expect to do couple of those while you iterate on your PRs in Airflow.

@olivermeyer
Copy link
Contributor Author

Bumping this PR - any chance one of the reviewers could take a look?

@potiuk
Copy link
Member

potiuk commented Jun 21, 2021

Hey Everyone - any comments here? @kaxil :) ? I somehow have a feeling that using the custom encoder is not the best idea.

Copy link
Member

@kaxil kaxil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah please hold off on this one, as a part of #8703 we were hoping/planning to use Serialization code in https://github.com/apache/airflow/blob/19ed074e9c696eb4aff25f3a833e7f359f2b1c38/airflow/serialization/serialized_objects.py to achieve the same and more.

And at some point remove the JsonEncode in airflow.utils in favor of it too.

@olivermeyer
Copy link
Contributor Author

@kaxil thanks for taking a look. I'll close this PR for now. One thing isn't clear to me: will there be a need for a similar PR in the future to use some other custom serialization when setting an Xcom, or will that somehow be handled as part of #8703?

@kaxil
Copy link
Member

kaxil commented Jun 28, 2021

@kaxil thanks for taking a look. I'll close this PR for now. One thing isn't clear to me: will there be a need for a similar PR in the future to use some other custom serialization when setting an Xcom, or will that somehow be handled as part of #8703?

Yup, that is correct, there was an attempt in #9847 however the PR was abandoned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SageMaker operators return non-serializable value

3 participants