Skip to content

Conversation

@sryza
Copy link
Contributor

@sryza sryza commented Nov 20, 2025

What changes were proposed in this pull request?

If the name provided to spark-pipelines init matches an existing directory, raises an error instead of overwriting the existing directory's contents.

Why are the changes needed?

Help users avoid accidentally overwriting their code.

Does this PR introduce any user-facing change?

Yes, to an unreleased version.

How was this patch tested?

Added unit test for the cases where init is invoked with an existing directory.

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

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM for this init fix. Thank you, @sryza .

dongjoon-hyun pushed a commit that referenced this pull request Nov 20, 2025
…ting directory

### What changes were proposed in this pull request?

If the name provided to `spark-pipelines init` matches an existing directory, raises an error instead of overwriting the existing directory's contents.

### Why are the changes needed?

Help users avoid accidentally overwriting their code.

### Does this PR introduce _any_ user-facing change?

Yes, to an unreleased version.

### How was this patch tested?

Added unit test for the cases where init is invoked with an existing directory.

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

Closes #53140 from sryza/initoverwrite.

Authored-by: Sandy Ryza <sandy.ryza@databricks.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 6811eab)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun
Copy link
Member

Merged to master/4.1.

huangxiaopingRD pushed a commit to huangxiaopingRD/spark that referenced this pull request Nov 25, 2025
…ting directory

### What changes were proposed in this pull request?

If the name provided to `spark-pipelines init` matches an existing directory, raises an error instead of overwriting the existing directory's contents.

### Why are the changes needed?

Help users avoid accidentally overwriting their code.

### Does this PR introduce _any_ user-facing change?

Yes, to an unreleased version.

### How was this patch tested?

Added unit test for the cases where init is invoked with an existing directory.

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

Closes apache#53140 from sryza/initoverwrite.

Authored-by: Sandy Ryza <sandy.ryza@databricks.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants