qianlan717 opened a new pull request, #59220: URL: https://github.com/apache/spark/pull/59220
### What changes were proposed in this pull request?\n\nThis PR changes Hive metastore dependency resolution when a custom spark.jars.ivySettings file is configured:\n\n- Add spark.sql.maven.additionalRemoteRepositories only when the user explicitly sets it.\n- Preserve the existing effective default repository behavior when no custom Ivy settings file is used.\n- Document the custom Ivy settings behavior.\n- Add regression coverage for default and explicitly configured repositories.\n\n### Why are the changes needed?\n\nspark.sql.maven.additionalRemoteRepositories has a default Google Cloud Storage Maven mirror. IsolatedClientLoader previously read the effective value unconditionally and appended that mirror even when users supplied a custom Ivy settings file.\n\nUsers who provide custom Ivy settings expect those settings to control repository resolution. Implicitly adding another repository can violate network or repository policy and causes unexpected outbound access.\n\n### Do es this PR introduce _any_ user-facing change?\n\nYes.\n\nPreviously, setting spark.jars.ivySettings implicitly appended the default spark.sql.maven.additionalRemoteRepositories value, including the default Google Cloud Storage mirror.\n\nAfter this change, a custom Ivy settings file is used without additional remote repositories unless spark.sql.maven.additionalRemoteRepositories is explicitly configured. Behavior without a custom Ivy settings file remains unchanged.\n\n### How was this patch tested?\n\nAdded assertions to IsolatedClientLoaderIvySettingsSuite covering:\n\n- Custom Ivy settings with no explicit additional repositories.\n- Resolution without custom Ivy settings, which retains the effective default.\n- Explicit additional repositories with and without custom Ivy settings.\n\nRan:\n\n build/sbt 'hive/testOnly org.apache.spark.sql.hive.client.IsolatedClientLoaderIvySettingsSuite'\n\nResult: 2 tests passed, 0 failed.\n\n### Was this patch authored or co-authored using generative AI tooling?\n\nGenerated-by: OpenAI Codex (GPT-5) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
