-
Notifications
You must be signed in to change notification settings - Fork 229
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
fix: Make supporting classes of AwsCredentials serializable #1113
fix: Make supporting classes of AwsCredentials serializable #1113
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
This can fix GoogleCloudDataproc/spark-bigquery-connector#845 as well. @jmahonin Do you need help with it? |
Just a review at this point! I can confirm this PR fixes the same serialization issue I observed with Flink. I'm not in a position to test against Spark, but based on past experience, I likewise suspect this will fix it there as well. |
@jmahonin That's fine, I'll test it once released. Can you please rebase the PR so it can be merged? |
Will do, expect a ping on Monday |
7bd9f53
to
04cf78a
Compare
@davidrabinowitz Rebased |
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.
Please add serialize unit tests for affected classes. You can leverage existing helper for it by extending the BaseSerializationTest
04cf78a
to
683e052
Compare
Good call @TimurSadykov , added the tests and discovered There was already a serialization test on ImpersonatedCredentials, though they all use a mock transport factory so there isn't coverage on instantiating the factory in I didn't add a specific test for the deserialization of |
oauth2_http/javatests/com/google/auth/oauth2/ExternalAccountCredentialsTest.java
Show resolved
Hide resolved
0c7d9ef
to
6c08794
Compare
I've updated the unit tests to ensure subclasses of ExternalAccountCredentials have similar However, the |
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.
LGTM
This fell off my radar for a bit. I see there's an approval and a request for changes re: subclasses having their own serialVersionUIDs. I'm happy to make the change, but want to confirm first given the PR's been approved. |
jmahonin please make the change and we will merge the PR, LG otherwise |
Discovered ServiceAccountImpersonationOptions needed be serializable as well.
Note that PluggableAuthCredentials uses a non-serializable ExecutableHandler. It's not clear that this can/should be a serializable credential source.
b659745
to
5036d48
Compare
This is done. I didn't include a serialVersionUID for |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #1112 ☕️
If you write sample code, please follow the samples format.