Skip to content

Commit bfe882c

Browse files
committed
Merge branch 'main' of github.com:databricks/cli into config-sync-new-defaults
2 parents 47b2a8c + a0418ac commit bfe882c

File tree

13 files changed

+74
-14
lines changed

13 files changed

+74
-14
lines changed

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* Added support for UC catalogs (only in direct mode) ([#4342](https://github.com/databricks/cli/pull/4342))
1616
* engine/direct: Fix updates to fields being ignored for database_catalogs, synced_database_tables (([#4388](https://github.com/databricks/cli/pull/4388)))
1717
* engine/direct: Fix migration for database_instances, database_catalog, synced_database_tables ([#4424](https://github.com/databricks/cli/pull/4424))
18+
* Show warning message if valueFrom is used instead of value_from in app config section ([$4429](https://github.com/databricks/cli/pull/4429))
1819

1920
### Dependency updates
2021

acceptance/bin/contains.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
found.add(t)
1919
for t in must_not_find:
2020
if t in line:
21-
sys.stderr.write(f"contains error: {t!r} was not expected\n")
21+
sys.stderr.write(f"contains error: {t!r} was not expected: {line.strip()!r}\n")
2222

2323
sys.stdout.flush()
2424

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("Hello from the app!")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
bundle:
2+
name: test-bundle
3+
4+
resources:
5+
apps:
6+
myapp:
7+
name: myapp
8+
source_code_path: ./app
9+
config:
10+
env:
11+
- name: MY_SECRET
12+
valueFrom: secret://my_secret

acceptance/bundle/apps/value_from_warning/out.test.toml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
>>> [CLI] bundle validate
3+
Warning: Use 'value_from' instead of 'valueFrom'
4+
at resources.apps.myapp.config.env[0]
5+
in databricks.yml:12:13
6+
7+
The field 'valueFrom' should be 'value_from' (snake_case). The 'valueFrom' field will be ignored.
8+
9+
Name: test-bundle
10+
Target: default
11+
Workspace:
12+
User: [USERNAME]
13+
Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
14+
15+
Found 1 warning
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
trace $CLI bundle validate
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
RecordRequests = false
2+
3+
Ignore = [
4+
'.databricks',
5+
]

acceptance/bundle/invariant/migrate/script

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cp databricks.yml LOG.config
1818

1919
cleanup() {
2020
trace $CLI bundle destroy --auto-approve &> LOG.destroy
21-
cat LOG.destroy | contains.py '!panic' '!internal error' > /dev/null
21+
cat LOG.destroy | contains.py '!panic:' '!internal error' > /dev/null
2222

2323
# Run cleanup script if present
2424
CLEANUP_SCRIPT="$TESTDIR/../configs/$INPUT_CONFIG-cleanup.sh"
@@ -30,14 +30,14 @@ cleanup() {
3030
trap cleanup EXIT
3131

3232
trace DATABRICKS_BUNDLE_ENGINE=terraform $CLI bundle deploy &> LOG.deploy
33-
cat LOG.deploy | contains.py '!panic' '!internal error' > /dev/null
33+
cat LOG.deploy | contains.py '!panic:' '!internal error' > /dev/null
3434

3535
echo INPUT_CONFIG_OK
3636

3737
trace $CLI bundle deployment migrate &> LOG.migrate
3838

39-
cat LOG.migrate | contains.py '!panic' '!internal error' > /dev/null
39+
cat LOG.migrate | contains.py '!panic:' '!internal error' > /dev/null
4040

4141
$CLI bundle plan -o json &> plan.json
42-
cat plan.json | contains.py '!panic' '!internal error' > /dev/null
42+
cat plan.json | contains.py '!panic:' '!internal error' > /dev/null
4343
verify_no_drift.py plan.json

acceptance/selftest/contains/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Failed script
2020
=== This should complain about Hello present in output
2121
>>> python3 ./success.py
2222
Hello world
23-
contains error: 'Hello' was not expected
23+
contains error: 'Hello' was not expected: 'Hello world'
2424

2525
=== This should not complain
2626
>>> python3 ./success.py

0 commit comments

Comments
 (0)