Skip to content

Add --exclude-from and --include-from flags to sync command #2660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Apr 23, 2025

Conversation

anton-107
Copy link
Contributor

@anton-107 anton-107 commented Apr 4, 2025

Why

Exclude-from flag allows users to exclude file patterns from sync operations by providing a .gitignore -like file containing file patterns that should be excluded from sync

Usage:

$ databricks sync <SRC> <DEST> --exclude-from .my-exclude-file
$ databricks sync <SRC> <DEST> --include-from .my-include-file

Tests

  1. Added new acceptance tests
  2. Added new unit test

@anton-107 anton-107 temporarily deployed to test-trigger-is April 4, 2025 15:27 — with GitHub Actions Inactive
@anton-107 anton-107 temporarily deployed to test-trigger-is April 4, 2025 15:29 — with GitHub Actions Inactive
@anton-107 anton-107 temporarily deployed to test-trigger-is April 4, 2025 15:33 — with GitHub Actions Inactive
@anton-107 anton-107 marked this pull request as ready for review April 4, 2025 15:33
Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

I expect --include-from to be almost identical, could you include it in this PR?

Separately, I would prefer if we not use .databricksignore even in our test files. It implies (to me) there are semantics associated with this file name, even though that's something we explicitly don't want.

@anton-107 anton-107 force-pushed the anton-107/sync-excludefrom branch from 6ba54a9 to 76acd9b Compare April 17, 2025 13:27
@anton-107 anton-107 temporarily deployed to test-trigger-is April 17, 2025 13:28 — with GitHub Actions Inactive
@anton-107 anton-107 temporarily deployed to test-trigger-is April 17, 2025 13:49 — with GitHub Actions Inactive
@anton-107 anton-107 temporarily deployed to test-trigger-is April 17, 2025 13:56 — with GitHub Actions Inactive
@anton-107 anton-107 temporarily deployed to test-trigger-is April 17, 2025 14:08 — with GitHub Actions Inactive
…isting / missing) 2) refers to exact directory (existing / missing) 3) contains "**"
@anton-107 anton-107 temporarily deployed to test-trigger-is April 17, 2025 14:22 — with GitHub Actions Inactive
@anton-107 anton-107 temporarily deployed to test-trigger-is April 17, 2025 14:44 — with GitHub Actions Inactive
@anton-107 anton-107 changed the title Add --exclude-from flag to sync commands Add --exclude-from and --include-from flags to sync command Apr 17, 2025
@anton-107 anton-107 added this pull request to the merge queue Apr 23, 2025
Merged via the queue into main with commit 46b79a7 Apr 23, 2025
10 checks passed
@anton-107 anton-107 deleted the anton-107/sync-excludefrom branch April 23, 2025 08:15
deco-sdk-tagging bot added a commit that referenced this pull request Apr 23, 2025
## Release v0.249.0

### CLI
* Added `exclude-from` and `include-from` flags support to sync command ([#2660](#2660))

### Bundles
* Correctly translate paths to local requirements.txt file in environment dependencies ([#2736](#2736))
* Check for running resources with --fail-on-active-runs before any mutative operation during deploy ([#2743](#2743))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants