Skip to content

Do not modify/create .gitignore in bundle root - #2429

Merged
denik merged 11 commits into
mainfrom
denik/gitignore
Mar 5, 2025
Merged

Do not modify/create .gitignore in bundle root#2429
denik merged 11 commits into
mainfrom
denik/gitignore

Conversation

@denik

@denikdenik commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

Changes

  • Do not modify or edit .gitignore in bundle root.
  • Instead create .databricks/.gitignore with content set to "*"

Why

Merging our changes into existing .gitignore is complicated and adding .gitignore where it's not expected adds to the noise. Other tools also use the approach in this PR (e.g. ruff creates .ruff_cache/.gitignore).

Tests

  • Modified templates/default-sql to capture this new file.

@denik
deniktemporarily deployed to test-trigger-is March 4, 2025 16:16 — with GitHub Actions Inactive
@denik
denik changed the base branch from main to denik/gitignore-testMarch 4, 2025 16:16
@denik
deniktemporarily deployed to test-trigger-is March 4, 2025 16:20 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is March 4, 2025 17:38 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is March 5, 2025 08:20 — with GitHub Actions Inactive
@denik
denik changed the base branch from denik/gitignore-test to mainMarch 5, 2025 09:19
@denik
deniktemporarily deployed to test-trigger-is March 5, 2025 09:22 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is March 5, 2025 09:27 — with GitHub Actions Inactive
@denik
deniktemporarily deployed to test-trigger-is March 5, 2025 09:48 — with GitHub Actions Inactive

@pieternpietern left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you check that the file .databricks/.gitignore itself is also excluded from Git commits in this new setup? I recall some tools don't match dotfiles with the pattern *.

Comment threadacceptance/bundle/templates/dbt-sql/script
Comment threadacceptance/bundle/templates/default-sql/script
@denik

denik commented Mar 5, 2025

Copy link
Copy Markdown
ContributorAuthor

Can you check that the file .databricks/.gitignore itself is also excluded from Git commits in this new setup? I recall some tools don't match dotfiles with the pattern *.

/tmp % mkdir newrepo
/tmp % cd newrepo
/tmp/newrepo % git init
Initialized empty Git repository in /private/tmp/newrepo/.git/
/tmp/newrepo % mkdir .databricks
/tmp/newrepo % printf "*\n" > .databricks/.gitignore
/tmp/newrepo % touch .databricks/other_file
/tmp/newrepo % touch hello
/tmp/newrepo % mkdir .databricks/subdir
/tmp/newrepo % touch .databricks/subdir/file.txt
/tmp/newrepo % git status
On branch main
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
hello
nothing added to commit but untracked files present (use "git add" to track)

Comment threadacceptance/bundle/templates/default-sql/script
Comment threadacceptance/bundle/templates/default-python/classic/script Outdated
@pietern

Copy link
Copy Markdown
Contributor

Thanks for confirming!

@denik
deniktemporarily deployed to test-trigger-is March 5, 2025 10:30 — with GitHub Actions Inactive
@denik
denik requested a review from pieternMarch 5, 2025 10:31
@denik
deniktemporarily deployed to test-trigger-is March 5, 2025 10:31 — with GitHub Actions Inactive
@denik
denik enabled auto-merge March 5, 2025 10:41
@denik
denik added this pull request to the merge queueMar 5, 2025
Merged via the queue into main with commit a26461cMar 5, 2025
@denik
denik deleted the denik/gitignore branch March 5, 2025 11:05
andrewnester added a commit that referenced this pull request Mar 5, 2025
CLI:
* Upgrade Go SDK to 0.59.0 ([#2425](#2425)).
Bundles:
* Added a warning when `config` section is used in apps ([#2416](#2416)).
* Switch to use GET workspaces-files/{name} instead of workspace/export for state files to avoid 10MB limit ([#2423](#2423)).
* Use schema field for pipeline in builtin template ([#2347](#2347)).
* Add warning when variable interpolation is used for auth fields ([#2399](#2399)).
* Add warning when include is used in config files other than databricks.yml ([#2389](#2389)).
* Add support for schemas in deployment bind/unbind commands ([#2406](#2406)).
* Do not modify/create .gitignore in bundle root ([#2429](#2429)).
* Raise an error when there are multiple local libraries with the same basename used ([#2382](#2382)).
* Upgrade TF provider to 1.68.0 ([#2426](#2426)).
API Changes:
* Changed `databricks experiments log-inputs` command with new required argument order.
* Added `databricks genie get-space` command.
* Added `databricks providers list-provider-share-assets` command.
* Changed `databricks shares update-permissions` command return type to become non-empty.
OpenAPI commit e5c870006a536121442cfd2441bdc8a5fb76ae1e (2025-03-03)
github-merge-queueBot pushed a commit that referenced this pull request Mar 5, 2025
CLI:
* Upgrade Go SDK to 0.59.0
([#2425](#2425)).
Bundles:
* Added a warning when `config` section is used in apps
([#2416](#2416)).
* Switch to use GET workspaces-files/{name} instead of workspace/export
for state files to avoid 10MB limit
([#2423](#2423)).
* Use schema field for pipeline in builtin template
([#2347](#2347)).
* Add warning when variable interpolation is used for auth fields
([#2399](#2399)).
* Add warning when include is used in config files other than
databricks.yml ([#2389](#2389)).
* Add support for schemas in deployment bind/unbind commands
([#2406](#2406)).
* Do not modify/create .gitignore in bundle root
([#2429](#2429)).
* Raise an error when there are multiple local libraries with the same
basename used ([#2382](#2382)).
* Upgrade TF provider to 1.68.0
([#2426](#2426)).
API Changes:
* Changed `databricks experiments log-inputs` command with new required
argument order.
* Added `databricks genie get-space` command.
* Added `databricks providers list-provider-share-assets` command.
* Changed `databricks shares update-permissions` command return type to
become non-empty.
OpenAPI commit e5c870006a536121442cfd2441bdc8a5fb76ae1e (2025-03-03)
denik added a commit that referenced this pull request May 20, 2026
## Changes
- Do not modify or edit .gitignore in bundle root.
- Instead create .databricks/.gitignore with content set to "*"
## Why
Merging our changes into existing .gitignore is complicated and adding
.gitignore where it's not expected adds to the noise. Other tools also
use the approach in this PR (e.g. ruff creates .ruff_cache/.gitignore).
## Tests
- Modified templates/default-sql to capture this new file.
denik pushed a commit that referenced this pull request May 20, 2026
CLI:
* Upgrade Go SDK to 0.59.0
([#2425](#2425)).
Bundles:
* Added a warning when `config` section is used in apps
([#2416](#2416)).
* Switch to use GET workspaces-files/{name} instead of workspace/export
for state files to avoid 10MB limit
([#2423](#2423)).
* Use schema field for pipeline in builtin template
([#2347](#2347)).
* Add warning when variable interpolation is used for auth fields
([#2399](#2399)).
* Add warning when include is used in config files other than
databricks.yml ([#2389](#2389)).
* Add support for schemas in deployment bind/unbind commands
([#2406](#2406)).
* Do not modify/create .gitignore in bundle root
([#2429](#2429)).
* Raise an error when there are multiple local libraries with the same
basename used ([#2382](#2382)).
* Upgrade TF provider to 1.68.0
([#2426](#2426)).
API Changes:
* Changed `databricks experiments log-inputs` command with new required
argument order.
* Added `databricks genie get-space` command.
* Added `databricks providers list-provider-share-assets` command.
* Changed `databricks shares update-permissions` command return type to
become non-empty.
OpenAPI commit e5c870006a536121442cfd2441bdc8a5fb76ae1e (2025-03-03)
Sign up for freeto 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.

2 participants

@denik@pietern