relation-get should error if --app is missing and app supplied

Bug #2053282 reported by Ian Booth
6
This bug affects 1 person
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

Tags: bitesize
Changed in juju:
assignee: nobody → Alastair Flynn (aflynn50)
importance: Undecided → Critical
importance: Critical → Low
importance: Low → Undecided
Changed in juju:
importance: Undecided → High
Revision history for this message
Ian Booth (wallyworld) wrote :
Changed in juju:
status: New → Fix Committed
Ian Booth (wallyworld)
Changed in juju:
milestone: 3.3.2 → 3.3.3
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.

Other bug subscribers

Remote bug watches

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