mozilla / normandy

Firefox recipe server
https://wiki.mozilla.org/Firefox/Recipe_Server
Mozilla Public License 2.0
55 stars 46 forks source link

Limit all slugs to 80 characters #2146

Open mythmon opened 4 years ago

mythmon commented 4 years ago

Normandy slugs get used in a lot of places, that have various limits. The most restrictive one we know about is Events, where we use the recipe's slug as the Event's value field. That field is limited by telemetry to 80 characters.

The client will safely truncate these fields, but that makes for confusing telemetry. We should limit this on the server.

There is one recipe that currently has a slug longer than 80 characters, recipe 326. Since this is an old recipe that isn't active anymore, I think it is fine. If we end up with problems we can revise that recipe to shorten the slug without issue.

jaredlockhart commented 4 years ago

@mythmon I just checked with sunah and she linked me to the current telemetry docs that indicate the limit is now 100 characters:

https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/data/environment.html#experiments

Are you sure the events limit is still 80?

mythmon commented 4 years ago

The docs says event values are limited to 80: https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/collection/events.html#limits

jaredlockhart commented 4 years ago

@mythmon you are correct we should limit it to 80 everywhere