The bundle ref at https://jaas.ai/docs/bundle-reference doesn't really say which bundle elements are required. IMHO it would make sense to allow defining an application without a charm reference, for instance to be able to refer existing applications in relations. In any case this should not result in a SEGV.
Deploying an application bundle without a charm: statement will result in a SIGSEGV.
Simplest test case:
peter@pirx ~/tmp » cat tst.yaml
applications:
ubuntu:
peter@pirx ~/tmp » juju deploy ./tst.yaml
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x18689b0]
goroutine 1 [running]: com/juju/ juju/cmd/ juju/applicatio n.applicationRe quiresTrust( ...)
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ juju/applicatio n/bundle. go:1677 com/juju/ juju/cmd/ juju/applicatio n.appsRequiring Trust(0xc420bed 410, 0xc42050bda0, 0x24, 0x1)
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ juju/applicatio n/deploy. go:1707 +0xe0 com/juju/ juju/cmd/ juju/applicatio n.(*DeployComma nd).deployBundl e(0xc42041ec80, 0xc42027db80, 0x0, 0xc420c5c580, 0xc420beb860, 0xf, 0x0, 0x0, 0x0, 0x0, ...)
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ juju/applicatio n/deploy. go:848 +0x7dd com/juju/ juju/cmd/ juju/applicatio n.(*DeployComma nd).maybeReadLo calBundle. func1(0xc42027d b80, 0x36c3640, 0xc4208279a0, 0xc420bed440, 0x0)
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ juju/applicatio n/deploy. go:1337 +0x1a7 com/juju/ juju/cmd/ juju/applicatio n.(*DeployComma nd).Run( 0xc42041ec80, 0xc42027db80, 0x0, 0x0)
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ juju/applicatio n/deploy. go:1154 +0x49a com/juju/ juju/cmd/ modelcmd. (*modelCommandW rapper) .Run(0xc4209849 30, 0xc42027db80, 0xc420984930, 0xc420608290)
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ modelcmd/ modelcommand. go:606 +0x11c com/juju/ juju/cmd/ modelcmd. (*baseCommandWr apper). Run(0xc4203117c 0, 0xc42027db80, 0x0, 0x0)
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ modelcmd/ base.go: 471 +0xab com/juju/ juju/vendor/ github. com/juju/ cmd.(*SuperComm and).Run( 0xc420418500, 0xc42027db80, 0xc42027db80, 0x0)
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/vendor/ github. com/juju/ cmd/supercomman d.go:493 +0x2c0 com/juju/ juju/vendor/ github. com/juju/ cmd.Main( 0x3665c00, 0xc420418500, 0xc42027db80, 0xc42004c0d0, 0x2, 0x2, 0x2db4780)
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/vendor/ github. com/juju/ cmd/cmd. go:379 +0x2d9 com/juju/ juju/cmd/ juju/commands. main.Run( 0x332c328, 0xc42004c0c0, 0x3, 0x3, 0x0)
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ juju/commands/ main.go: 143 +0x1af com/juju/ juju/cmd/ juju/commands. Main(0xc42004c0 c0, 0x3, 0x3, 0xc42000c160)
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ juju/commands/ main.go: 89 +0x4b
/build/ juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ juju/main. go:37 +0x8c
github.
github.
github.
github.
github.
github.
github.
github.
github.
github.
github.
main.main()
The bundle ref at https:/ /jaas.ai/ docs/bundle- reference doesn't really say which bundle elements are required. IMHO it would make sense to allow defining an application without a charm reference, for instance to be able to refer existing applications in relations. In any case this should not result in a SEGV.