Repository navigation
Add --skip-examples to databricks apps init (LA-2397) - #7591
Closed
atilafassina wants to merge 8 commits into
Closed
atilafassina wants to merge 8 commits into
atilafassina wants to merge 8 commits into
Conversation
Passes the flag to the template as `skipExamples`, so templates can gate
their placeholder files on `{{if not .skipExamples}}`. The AppKit template
uses it (databricks/appkit#734) to leave out config/queries/*.sql and
server/example.test.ts. Without the flag the key is false and behavior is
unchanged.
Files that render empty are already skipped and empty directories
removed, so config/queries/ disappears when all its queries are gated.
Co-authored-by: Isaac <no-reply@databricks.com>
…dd-apps-init-skip-examples-la
atilafassina
requested review from
shreyas-goenka
and
a balanced review from Copilot
November 13, 2026 08:26
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…dd-apps-init-skip-examples-la
Contributor
Author
|
Review 2 · Pass Does the change do what the task asked? Yes. Gate: major and worse must be fixed. The flag reaches the template and works with both a local fixture and the AppKit PR template. Default scaffolds keep the examples; skip mode omits all three files and removes the empty queries directory. I found no change caused fault. No findings. |
Collaborator
✅ Integration test reportCommit: de75641
Top 6 slowest tests (at least 2 minutes):
|
…dd-apps-init-skip-examples-la
…dd-apps-init-skip-examples-la
…dd-apps-init-skip-examples-la
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.
Changes
Adds a
--skip-examplesflag todatabricks apps init. The flag reaches the template asskipExamples, so a template can gate its placeholder files with{{if not .skipExamples}}.Without the flag the key is false, so
not .skipExampleskeeps the files and nothing changes for current users. Older CLIs leave the key out, and the template reads that as false too.No other CLI change was needed.
copyTemplatealready skips files that render to only whitespace, andremoveEmptyDirsthen removes folders left empty. With the flag,config/queries/goes away once all its queries render empty.Why
databricks/appkit#734 gates the AppKit template's placeholder files on
.skipExamples:config/queries/hello_world.sql,config/queries/mocked_sales.sqlandserver/example.test.ts. The Builder deletes these files on nearly every run. With this flag it can scaffold without them.JIRA: LA-2397, a subtask of LA-2388.
Tests
cmd/apps/init_test.go:executeTemplaterenders{{if not .skipExamples}}x{{end}}asxby default and as nothing with the flag set.runCreateon a fixture template, with and without the flag. With it,config/andserver/example.test.tsare absent and the other files are still written. To confirm the test catches a missing hookup, I set the field tofalseinrunCreate, and the test failed.go test ./cmd/apps/... ./libs/apps/..., the apps acceptance tests,task lint-q,task wsandtask check-changelogpass.--features analytics,server.example.test.ts.--skip-examplesleaves outconfig/queries/andserver/example.test.ts, andconfig/metric-views/stays.This pull request and its description were written by Isaac.