[SPARK-56960][SQL][TESTS] Support custom Ivy settings file in HiveVersionSuite via environment variable#56003
Open
sarutak wants to merge 2 commits into
Open
[SPARK-56960][SQL][TESTS] Support custom Ivy settings file in HiveVersionSuite via environment variable#56003sarutak wants to merge 2 commits into
HiveVersionSuite via environment variable#56003sarutak wants to merge 2 commits into
Conversation
| // Path to a custom Ivy settings file for testing in environments that require | ||
| // authenticated access to private repositories: | ||
| private val ivySettingsPath: Option[String] = | ||
| sys.env.get("SPARK_VERSIONS_SUITE_IVY_SETTINGS") |
Member
There was a problem hiding this comment.
Is the following not working?
$ mvn test -Dspark.jars.ivySettings=xxx
$ sbt -Dspark.jars.ivySettings=xxx test
Member
Author
There was a problem hiding this comment.
System properties aren't propagated to forked test JVMs right?
| hadoopConf: Configuration, | ||
| extraConf: Map[String, String] = Map.empty): HiveClient = { | ||
| val sparkConf = new SparkConf() | ||
| ivySettingsPath.foreach(sparkConf.set(MavenUtils.JAR_IVY_SETTING_PATH_KEY, _)) |
Member
There was a problem hiding this comment.
Maybe, set -> setIfMissing?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR adds support for the
SPARK_VERSIONS_SUITE_IVY_SETTINGSenvironment variable inHiveClientBuilder. When set, its value is used as the path to a custom Ivy settings file (spark.jars.ivySettings) for Hive metastore jar resolution during tests.Why are the changes needed?
After SPARK-56867(#55881) added support for
spark.jars.ivySettingsinIsolatedClientLoader, the test infrastructure should also be able to leverage this configuration. In closed environments where only authenticated private repositories are accessible, tests that download Hive metastore jars (e.g.,HiveClientSuite,HivePartitionFilteringSuite) would fail without a way to specify credentials. This environment variable allows such environments to provide a custom Ivy settings file with the necessary authentication configuration.This follows the same pattern as the existing
SPARK_VERSIONS_SUITE_IVY_PATHenvironment variable, which allows specifying a custom Ivy cache path for the same set of tests.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Confirmed it works with a private repository which requires authentication.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude (via Kiro CLI, auto model selection)