`juju show-task ""` panics

Bug #2024783 reported by Simon Déziel
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Heather Lanigan
3.1
Fix Released
High
Heather Lanigan

Bug Description

Providing a bogus task ID causes a panic:

```
# juju show-task ""
panic: invalid action id ""

goroutine 1 [running]:
github.com/juju/names/v4.NewActionTag({0x7ffe8aac24b0, 0x0})
 /build/snapcraft-juju-67735438bf012563f9fb9dbad398e9fd/parts/juju/build/vendor/github.com/juju/names/v4/action.go:36 +0x125
github.com/juju/juju/api/client/action.(*Client).Actions(0xc0000cc9c0, {0xc000b80e20, 0x1, 0xc000dc7488?})
 /build/snapcraft-juju-67735438bf012563f9fb9dbad398e9fd/parts/juju/build/api/client/action/client.go:35 +0x94
github.com/juju/juju/cmd/juju/action.fetchResult({0x50f64d0, 0xc0000cc9c0}, {0x7ffe8aac24b0, 0x0})
 /build/snapcraft-juju-67735438bf012563f9fb9dbad398e9fd/parts/juju/build/cmd/juju/action/common.go:486 +0xf3
github.com/juju/juju/cmd/juju/action.(*showTaskCommand).Run(0xc0009257a0, 0xc0006b5bc0)
 /build/snapcraft-juju-67735438bf012563f9fb9dbad398e9fd/parts/juju/build/cmd/juju/action/showtask.go:162 +0x4e5
github.com/juju/juju/cmd/modelcmd.(*modelCommandWrapper).Run(0xc0006154a0, 0xc000c7f950?)
 /build/snapcraft-juju-67735438bf012563f9fb9dbad398e9fd/parts/juju/build/cmd/modelcmd/modelcommand.go:663 +0x123
github.com/juju/juju/cmd/modelcmd.(*baseCommandWrapper).Run(0xc0008dcfe0, 0x400000005?)
 /build/snapcraft-juju-67735438bf012563f9fb9dbad398e9fd/parts/juju/build/cmd/modelcmd/base.go:554 +0xaf
github.com/juju/cmd/v3.(*SuperCommand).Run(0xc0002492c0, 0xc0006b5bc0)
 /build/snapcraft-juju-67735438bf012563f9fb9dbad398e9fd/parts/juju/build/vendor/github.com/juju/cmd/v3/supercommand.go:534 +0x378
github.com/juju/cmd/v3.Main({0x50eb738, 0xc0002492c0}, 0xc0006b5bc0, {0xc0003b8c60, 0x2, 0x2})
 /build/snapcraft-juju-67735438bf012563f9fb9dbad398e9fd/parts/juju/build/vendor/github.com/juju/cmd/v3/cmd.go:419 +0x25d
github.com/juju/juju/cmd/juju/commands.jujuMain.Run({0xc0000e2140?}, {0xc0000720f0, 0x3, 0x3})
 /build/snapcraft-juju-67735438bf012563f9fb9dbad398e9fd/parts/juju/build/cmd/juju/commands/main.go:202 +0x8a5
github.com/juju/juju/cmd/juju/commands.Main(...)
 /build/snapcraft-juju-67735438bf012563f9fb9dbad398e9fd/parts/juju/build/cmd/juju/commands/main.go:125
main.main()
 /build/snapcraft-juju-67735438bf012563f9fb9dbad398e9fd/parts/juju/build/cmd/juju/main.go:27 +0x72
```

Additional information:
# snap list juju
Name Version Rev Tracking Publisher Notes
juju 3.2.0 23190 latest/stable canonical✓ -

Changed in juju:
importance: Undecided → High
status: New → Triaged
Changed in juju:
assignee: nobody → Heather Lanigan (hmlanigan)
milestone: none → 3.2.2
milestone: 3.2.2 → 3.2.1
Changed in juju:
milestone: 3.2.1 → 3.2.2
Revision history for this message
Heather Lanigan (hmlanigan) wrote (last edit ):
Changed in juju:
status: Triaged → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.