New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 711300 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 2
Type: Bug

Blocking:
issue 707232


Participants' hotlists:
Feature-Control-Code-Health


Sign in to add a comment

Add a 'platforms' option to runtimeenabledfeatures.json5

Project Member Reported by rbyers@chromium.org, Apr 13 2017

Issue description

We're increasingly building up entries in RuntimeEnabledFeatures.json5 which are confusing because the feature is enabled (in code) on some platforms but not others, eg. in runtimeEnabledFeatures.json5:

    // WebBluetooth is enabled by default on Android, ChromeOS and Mac.
    {
      name: "WebBluetooth",
      status: "experimental",
    },

Then in runtime_features.cc:

// Web Bluetooth is shipped on Android, ChromeOS & MacOS, experimental
// otherwise.
#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX)
  WebRuntimeFeatures::EnableWebBluetooth(true);
#endif

There are several more examples including MediaSession, PaymentRequest, and now NotificationContentImage: https://codereview.chromium.org/2814553002.  I'm sure there's more I don't know about that don't necessarily have a comment in RuntimeEnabledFeatures.json5.  Comparing webexposed expected output across platforms (see  issue 711292 ) should help identify the complete list.

Talking awhile back with ktyliu (who build the json5 infrastructure here - https://codereview.chromium.org/2656163005/) I think it would be pretty trivial to add an 'os' option, so we could remove the code above and just have something like this in the json5:

    {
      name: "WebBluetooth",
      status: "stable",
      os: ["android","chromeos","mac"],
      other_os_status: "experimental",
    },

other_os_status would default to "test" and so probably not usually need to be specified unless there's actually an experimental implementation we want to expose to other platforms.  This would probably be implemented similarly to the existing origin_trial_os option. 

To minimize confusion we might want to force other_os_status to never be 'stable'.  I.e. in this case: https://codereview.chromium.org/2814553002 you'd have to say:

    {
      name: "NotificationContentImage",
      status: "stable",
      os: ["windows", "android","chromeos","linux"],
    },

rather than use:

    {
      name: "NotificationContentImage",
      status: "test",
      os: ["mac"],
      other_os_status: ["stable"],
    },

But this could be up for debate.

We'd want to add some documentation at the time of RuntimeEnabledFeatures around guidance on how to use this, including:
 - wherever possible tests should be enabled on all platforms (which is why other_os_status defaults to test, not disabled).  Eg. most LayoutTests don't run at all on Android so we rely on the test coverage we get on Linux and other platforms.  This can also make debugging easier.
 - In general we prefer feature to be shipped on all platforms, but when a feature doesn't make sense (or isn't yet ready) for a given platform it's often better not to expose the feature at all than to expose it but have it fail.  That way developers can rely just on feature detection.

luna, we've hit this enough times now (and fixing is probably simple enough) that I think it's becoming urgent so I'd like to call this Pri-1 for M60. Can you take a look?  If it turns out to be harder than I anticipate I'm OK with lowering to Pri-2.
 

Comment 1 by rbyers@chromium.org, Apr 13 2017

Labels: -Pri-1 Pri-2
Actually it's really  issue 711292  that's causing more pain than this one (got my priorities mixed up, sorry).  I still think this is easy and worth doing but let's call it P2.

Comment 2 by cha...@chromium.org, Apr 19 2017

Blocking: 707232
Cc: cha...@chromium.org
Note that there is issue 707232, to fix the implementation of origin_trial_os. I've made this a blocker for that issue, because there's a question about the desired policy for platform-specific exposure.

The code generation for origin_trial_os works as expected, so I think it's a good starting point for this issue (it's the enabling logic specific to origin trials that needs to be fixed).

Comment 3 by lunalu@chromium.org, Jun 12 2017

Owner: loonyb...@chromium.org
Components: -Blink>Infra>Predictability Internals>FeatureControl
Labels: -M-60 M-67 OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac OS-Windows
looneybear, is this still being worked on? Should this still be P2 for Q2?
Cc: paulmeyer@chromium.org
Not actively.
I thought Paul was working on this awhile ago? 
I assume this is still an issue. So asking for updates since this is marked as a blocker of bug 707232.

A few questions following the description here and the discussions in bug 707232.

1- Would the "platforms" field replace "origin_trial_os"?

2- There is not much documentation around |origin_trial_os| in runtime_enabled_features.json5 and no samples anymore. How does it work?

3- Why not go all the way and make sure all platforms have a status: "stable", "experimental", "test", and perhaps introduce "disabled"? -- unless the intention is to make sure no feature can be fully disabled on a specific platform.

loonybear@: are you still the right owner for this bug. I think the owner of this bug should also own bug 707232.
Labels: -M-67
Owner: ----
Status: Available (was: Assigned)
Moving to Available, as this isn't actively being worked on. It is something we'd like to fix.

Sign in to add a comment