Skip to content

Commit 2a3d002

Browse files
authored
Add test for crash in "bundle summary" (#3138)
Bug introduced in #3123
1 parent 1f77d9b commit 2a3d002

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
resources:
2+
pipelines:
3+
my_pipeline:
4+
name: test-pipeline
5+
libraries:
6+
- file:
7+
path: "./intentionally-missing.py"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
=== Initial view of resources without id and modified_status=created
3+
>>> [CLI] bundle summary -o json
4+
Error: file intentionally-missing.py not found
5+
Please report this issue to Databricks in the form of a GitHub issue at:
6+
https://github.com/databricks/cli
7+
8+
Panic Payload: runtime error: invalid memory address or nil pointer dereference
9+
goroutine 1 [running]:
10+
runtime/debug.Stack()
11+
github.com/databricks/cli/cmd/root.Execute.func1()
12+
panic({HEX?, HEX?})
13+
github.com/databricks/cli/cmd/bundle.renderJsonOutput(HEX, HEX?)
14+
github.com/databricks/cli/cmd/bundle.renderBundle(HEX, HEX, {HEX, HEX, HEX}, HEX)
15+
github.com/databricks/cli/cmd/bundle.newSummaryCommand.func1(HEX, {HEX?, HEX?, HEX?})
16+
github.com/spf13/cobra.(*Command).execute(HEX, {HEX, HEX, HEX})
17+
github.com/spf13/cobra.(*Command).ExecuteC(HEX)
18+
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
19+
github.com/databricks/cli/cmd/root.Execute({HEX, HEX}, HEX)
20+
main.main()
21+
22+
Exit code: 1
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
title "Initial view of resources without id and modified_status=created"
2+
trace $CLI bundle summary -o json
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Badness = "Unexpected panic"
2+
3+
[[Repls]]
4+
Old = '0x[0-9a-f]{1,}'
5+
New = 'HEX'
6+
7+
[[Repls]]
8+
Old = '\n\s+.*\n'
9+
New = "\n"

0 commit comments

Comments
 (0)