Bug 1587579 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The capabilities of Normandy should also include the list of top level properties accessible to recipe filter expressions, such as `normandy.clientId`. Most of the time these kind of properties are safe to send to old clients, which is why the were not originally included in the list of capabilities. In some cases they can cause problems though, and so we should add them.

For example, `normandy.locale == "en-US"` will always be safe because if `locale` is not available in the filter context, it will be undefined. However, something like

```
[normandy.clientId, "global-v1"]|bucketSample(0, 100, 1000)
```

is not safe if `clientId` is not available. This is because `[undefined, "global-v1"]` will has to some value, and then either 100% of users or 0% of users will be enrolled in the recipe, depending on the other parameters. This is clearly not ideal.
The capabilities of Normandy should also include the list of top level properties accessible to recipe filter expressions, such as `normandy.clientId`. Most of the time these kind of properties are safe to send to old clients, which is why the were not originally included in the list of capabilities. In some cases they can cause problems though, and so we should add them.

For example, `normandy.locale == "en-US"` will always be safe because if `locale` is not available in the filter context, it will be undefined. However, something like

```
[normandy.clientId, "global-v1"]|bucketSample(0, 100, 1000)
```

is not safe if `clientId` is not available. This is because `[undefined, "global-v1"]` will hash to some value, and then either 100% of users or 0% of users will be enrolled in the recipe, depending on the other parameters. This is clearly not ideal.

Back to Bug 1587579 Comment 0