Skip to content

Conversation

@hasnain-db
Copy link
Contributor

What changes were proposed in this pull request?

This change ensures that RPC SSL options settings inheritance works properly after #43238 - we pass sslOptions wherever we call fromSparkConf.

In addition to that minor mechanical change, duplicate/add tests for every place that calls this method, to add a test case that runs with SSL support in the config.

Why are the changes needed?

These changes are needed to ensure that the RPC SSL functionality can work properly with settings inheritance. In addition, through these tests we can ensure that any changes to these modules are also tested with SSL support and avoid regressions in the future.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Full integration testing also done as part of #42685

Added some tests and ran them:

build/sbt
> project core
> testOnly org.apache.spark.*Ssl*
> testOnly org.apache.spark.network.netty.NettyBlockTransferSecuritySuite

and

build/sbt -Pyarn
> project yarn
> testOnly org.apache.spark.network.yarn.SslYarnShuffleServiceWithRocksDBBackendSuite

Was this patch authored or co-authored using generative AI tooling?

No

@hasnain-db
Copy link
Contributor Author

test failures looked unrelated, retrying now though.

@mridulm
Copy link
Contributor

mridulm commented Oct 18, 2023

A bit swamped this week, will go over this PR later this week.
+CC @JoshRosen if you have the bandwidth to review sooner ! Thanks.

@hasnain-db
Copy link
Contributor Author

no rush - thanks for looking into this!

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a repeated pattern - why not add it to SslSampleConfigs ?
SslSampleConfigs.updateConfWithDefault or some such ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to do that, but SparkConf is in core and SslSampleConfigs is in network-common - this would create a dependency loop since we don't have access to SparkConf inside network-common. If there is another good place to put this helper I can do it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point.
Why not TestUtils ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mridulm I took a look but unfortunately I can't -- TestUtils is in the main codebase, not the test codebase. SslSampleConfigs is test only (See

/**
* Utilities for tests. Included in main codebase since it's used by multiple
* projects.
*
* TODO: See if we can move this to the test codebase by specifying
* test dependencies between projects.
*/
)

But I created an SslTestUtils and used it everywhere except yarn.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good

@mridulm
Copy link
Contributor

mridulm commented Oct 23, 2023

Can you also fix the conflicts please ?

Copy link
Contributor Author

@hasnain-db hasnain-db left a comment

Choose a reason for hiding this comment

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

will address conflicts, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to do that, but SparkConf is in core and SslSampleConfigs is in network-common - this would create a dependency loop since we don't have access to SparkConf inside network-common. If there is another good place to put this helper I can do it.

@hasnain-db hasnain-db force-pushed the spark-tls-integrate-everywhere branch from 17cb346 to 722dea9 Compare October 23, 2023 17:49
@hasnain-db hasnain-db requested a review from mridulm October 23, 2023 17:59
Copy link
Contributor

@mridulm mridulm left a comment

Choose a reason for hiding this comment

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

Looks good to me, pending CI

Copy link
Contributor

@mridulm mridulm left a comment

Choose a reason for hiding this comment

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

Looks good to me, pending CI

@hasnain-db
Copy link
Contributor Author

CI looks green. thank you for reviewing @mridulm !

@mridulm mridulm closed this in 08c7bac Oct 25, 2023
@mridulm
Copy link
Contributor

mridulm commented Oct 25, 2023

Merged to master.
Thanks for working on this @hasnain-db !

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants