← Back to team overview

touch-packages team mailing list archive

[Bug 1502282] Re: "unknown" connectivity status problematic

 

I see different  network connectivity state reported from Search() and
from these: Activate(), Preview() and PerformAction().

I've written a simple golang scope [1] that shows the differences.

The scope has one result with SetInterceptAction(), so it goes to
Activate, then it goes to Preview() where there is one button that runs
PerformAction().

In each method I show the connection state as returned from the metadata
passed into search AND that passed into the current method.

Here is the (commented) scope-registry.log: (value of 0 is unknown, 1 is
connected, 2 is disconnected)

#WITH NETWORK

2016/01/28 22:43:37 =========  METATDATA TEST  Search() ================================
2016/01/28 22:43:37 === Search(): Search's metadata.InternetConnectivity(): 1
# HERE I TAP THE RESULT WHICH RUNS Activate()
2016/01/28 22:43:42 === Activate(): Search's metadata.InternetConnectivity(): 1
2016/01/28 22:43:42 === Activate(): local's metadata.InternetConnectivity(): 0
2016/01/28 22:43:42 === Preview(): Search's metadata.InternetConnectivity(): 1
2016/01/28 22:43:42 === Preview(): local's metadata.InternetConnectivity(): 0
#HERE I TAP THE BUTTON WICH RUNS PerformAction()
2016/01/28 22:43:44 === PerformAction(): Search's metadata.InternetConnectivity(): 1
2016/01/28 22:43:44 === PerformAction(): local's metadata.InternetConnectivity(): 0

#WITH NO NETWORK (FLIGHT MODE ON) & REFRESHED SCOPE:

2016/01/28 22:44:36 =========  METATDATA TEST  Search() ================================
2016/01/28 22:44:36 === Search(): Search's metadata.InternetConnectivity(): 2
2016/01/28 22:44:40 === Activate(): Search's metadata.InternetConnectivity(): 2
2016/01/28 22:44:40 === Activate(): local's metadata.InternetConnectivity(): 0
2016/01/28 22:44:40 === Preview(): Search's metadata.InternetConnectivity(): 2
2016/01/28 22:44:40 === Preview(): local's metadata.InternetConnectivity(): 0
2016/01/28 22:44:42 === PerformAction(): Search's metadata.InternetConnectivity(): 2
2016/01/28 22:44:42 === PerformAction(): local's metadata.InternetConnectivity(): 0

[1]  
lp:~knitzsche/+junk/metadatatest

scope attached

** Attachment added: "dropbox.testmetatadata_0.3.6_armhf.click"
   https://bugs.launchpad.net/ubuntu/+source/unity-scopes-api/+bug/1502282/+attachment/4558671/+files/dropbox.testmetatadata_0.3.6_armhf.click

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity-scopes-shell in
Ubuntu.
https://bugs.launchpad.net/bugs/1502282

Title:
  "unknown" connectivity status problematic

Status in The Savilerow project:
  New
Status in unity-scopes-api package in Ubuntu:
  Incomplete
Status in unity-scopes-shell package in Ubuntu:
  Incomplete

Bug description:
  metadata provides a scope a network connectivity status enum with three possible states:
  * connected
  * disconnected
  * unknown

  Sometimes unknown is the current state. This is quite problematic
  because in general a scopes that queries the network (that is, most
  scopes) need to know whether there is network or is not network and
  depending on this either make the network queries or display an error
  message.

  A status of unknown connectivity leaves the scope with no valid option:
  * the scope could assume the network is down and provide the user an error message. But often the network is not actually down, so this interrupts the user's flow unnecessarily
  *  the scope could assume the network is up, but this is dangerous if it is not up

To manage notifications about this bug go to:
https://bugs.launchpad.net/savilerow/+bug/1502282/+subscriptions


References