[SPARK-58531][SQL][CONNECT] Make spark.sql.artifact.copyFromLocalToFs.allowDestLocal a static conf - #57730
Open
haoyangeng-db wants to merge 1 commit into
Conversation
….allowDestLocal a static conf and remove the deprecated spark.connect.copyFromLocalToFs.allowDestLocal Completes the Spark 4.0 migration of the `copyFromLocalToFs` local-destination gate: `spark.sql.artifact.copyFromLocalToFs.allowDestLocal` becomes a static SQL conf and the deprecated `spark.connect.copyFromLocalToFs.allowDestLocal` is removed, leaving one conf for the gate. The gate controls whether a caller can write to an arbitrary path on the driver's local filesystem, so it is meant to be set by whoever starts the driver -- as its own doc says, "when starting spark driver". The deprecated Connect conf was a static conf and enforced that, but its replacement was declared as a runtime conf, so a session could set it and override the value the driver was started with. Declaring the replacement in StaticSQLConf restores that property. Co-authored-by: Isaac
cloud-fan
approved these changes
Aug 4, 2026
cloud-fan
left a comment
Contributor
There was a problem hiding this comment.
0 blocking, 0 non-blocking, 0 nits.
The configuration lifecycle, enforcement path, migration cleanup, and focused regression coverage are internally consistent.
Verification
I traced static-config registration through SQLConf.buildStaticConf, the SparkConf-to-session initialization path, and the ArtifactManager local-filesystem branch. I also verified that the replacement remains default-disabled, the enabled suite path is configured before session creation, and the new test rejects session mutation. Tests were not run as part of this review.
HyukjinKwon
approved these changes
Aug 4, 2026
uros-b
approved these changes
Aug 4, 2026
Member
|
LGTM, thank you @haoyangeng-db and @HyukjinKwon! |
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?
Completes the Spark 4.0 migration of the
copyFromLocalToFslocal-destination gate:spark.sql.artifact.copyFromLocalToFs.allowDestLocalbecomes a static SQL conf and the deprecatedspark.connect.copyFromLocalToFs.allowDestLocalis removed, leaving one conf for the gate.Why are the changes needed?
The config controls whether a caller can write to an arbitrary path on the driver's local filesystem, so it is meant to be set by whoever starts the driver -- as its own doc says, "when starting spark driver". The deprecated Connect conf was a static conf and enforced that, but its replacement was declared as a runtime conf, so a session could set it and override the value the driver was started with. Declaring the replacement in StaticSQLConf restores that property.
Does this PR introduce any user-facing change?
N/A
How was this patch tested?
New and existing tests.
Was this patch authored or co-authored using generative AI tooling?
Co-authored by Claude Code