Global autoconnect request for ubuntu-frame:ubuntu-frame-diagnostic

ubuntu-frame provides an ubuntu-frame-diagnostic content slot through which textual diagnostic information can be supplied to Frame.

The diagnostic information will be displayed by Frame if no application is running after a short timeout. This can be used to text information: such as “Oops! Please switch off and on again”, “ip address: xxx.xxx.xxx.xxx”, a crash dump, etc.

Applications plugging this slot should be connected by default.

Any @reviewers willing to vote?

Can you describe a bit more about this content slot? I can’t see it in the current version of ubuntu-frame in the store. What does it provide to consuming snaps? Will this API be maintained going forward?

It is currently in candidate.

The slot provides a place to write a text file for display by ubuntu-frame. This will be maintained going forward.

Ah ok the store only shows the most recent upload - after manually downloading that revision I see there is:

slots:
  ubuntu-frame-diagnostic:
    interface: content
    content: writable-data
    write:
    - $SNAP_COMMON/diagnostic

I wonder if writable-data is the best name here - perhaps instead it should be diagnostic-data since any snap which wants to plug this will also have to use that name - thoughts?

I’m open to suggestions about the name, but I don’t find diagnostic-data much of an improvement.

Does the content field actually affect anything? I tried changing the text in my frame-diagnostic test snap and it still connects (manually) and works

[edit, after further thoughts]

AFAICS the content: attribute is simply “an arbitrary identifier for content type” and has no function beyond documentation. I can find very few snaps that bother to specify it (and many that don’t).

So, my preferred approach is to drop the explicit attribute.

Alternately, maybe diagnostic-text would suggests that the content will be treated as text.

Thoughts?

My understanding is that for the auto-connect declaration on the store, it will only auto-connect when a plugging snap uses the same content attribute - so any snap which wants to plug this will have to use the same content attribute, and hence having a sensible name here is important.

I like your suggestion of diagnostic-text - +1 from me for granting global auto-connect for this content slot using that attribute.

Done (on candidate)

…and now on stable.

Any more @reviewers willing to vote?

+1 from me too for global auto-connect.

+2 votes for, 0 votes against, granting global auto-connect for the diagnostic-text content slot of the ubuntu-frame snap, this is now live.