Instance key stability in refresh requests

Bug #1944582 reported by Maximiliano Bertacchini
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Heather Lanigan
2.9
Fix Released
High
Heather Lanigan

Bug Description

In order to collect, aggregate, and track accurate metrics & kpis for parallel installs, i.e. multiple instances of the same charm in a model, the snap store needs *stable* instance keys across refresh requests over time. Instance keys are currently randomly generated for each context item on each request, afaik.

Changed in juju:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Heather Lanigan (hmlanigan)
milestone: none → 3.0.0
Changed in juju:
status: Triaged → In Progress
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

PR for juju 3.0
https://github.com/juju/juju/pull/13379

When the refresh action is called, a unique, stable instance-key will be set, equivalent to <model-uuid>:a#<application-name>. Any instance-key which is only a uuid, should not be considered stable.

All charmhub metrics work in juju will be back ported to 2.9 shortly.

Changed in juju:
status: In Progress → Fix Committed
Revision history for this message
William Grant (wgrant) wrote :

I'm not comfortable with the privacy implications of this specific change: Juju now reports application names, which may well be sensitive or potentially even PII.

Consider instead a privacy-preserving implementation like snapd's genInstanceKey, which hashes with a persistent client-specific salt: https://github.com/snapcore/snapd/blob/master/store.store_action.go#L268

Also note that instance keys are local to a single reporting entity (in Juju's case, a model), so there's no need to include the model UUID.

Revision history for this message
Heather Lanigan (hmlanigan) wrote :

Investigating how snap does genInstanceKey.

Revision history for this message
Heather Lanigan (hmlanigan) wrote :

Updated in https://github.com/juju/juju/pull/13391 - which will be forward ported to develop once it lands.

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.