relation-get should error if --app is missing and app supplied
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Alastair Flynn |
Bug Description
If relation-get is run like so:
relation-get -r 7 ingress traefik
it is supposed to error because traefik is an app name (not a unit) and --app wasn't supplied.
The code comments say so (see 1b)
// The logic is as follows:
// 1) If a user supplies a unit or app name, that overrides any default
// a) If they supply --app and a unit name, we turn that back into an application name
// b) note, if they *don't* supply --app, and they specify an app name, that should be an error
// 2) If no unit/app is supplied then we look at our context
// a) If --app is specified, then we use the context app
// b) If --app is not specified, but we don't have a context unit but do have a context app
// then we set --app, and set the target as the app
// c) If we have a context unit, then that is used
Changed in juju: | |
assignee: | nobody → Alastair Flynn (aflynn50) |
importance: | Undecided → Critical |
importance: | Critical → Low |
importance: | Low → Undecided |
Changed in juju: | |
importance: | Undecided → High |
Changed in juju: | |
milestone: | 3.3.2 → 3.3.3 |
Changed in juju: | |
status: | Fix Committed → Fix Released |
https:/ /github. com/juju/ juju/pull/ 16938