Closed miketaylr closed 9 years ago
We populate @browser
from Browser / Version field, which maybe isn't the best idea.
Maybe we should run ua_parser on the UA string and grab the family name instead (possibly matching against a whitelist)? Right now if you put in "Cool Guy Foo" it'll create a browser-cool-guy-foo
label which is spam.
Thoughts @karlcow?
To clarify:
Maybe we should run ua_parser on the UA string and grab the family name instead (possibly matching against a whitelist)?
That's how we get 1/2 of the "Browser / Version" field. So this would be doing the same and just ignoring the version.
@miketaylr
match_list = re.search(r'<!--\s@(\w+):\s([^\d]+?)\s\d+.\d+\s-->', body)
This is working too.
ok my bad it was failing with things like Opera Mobile 31.0.1890
. Updated the regex
match_list = re.search(r'<!--\s@(\w+):\s([^\d]+?)\s[\d\.]+\s-->', body)
Additional possibilites.
<!--\s@browser:\s([^\d]+?)\s[\d\.]+\s-->
aka match browser without a group<!--\s@\w+:\s([^\d]+?)\s[\d\.]+\s-->
aka match browser in a more loosely way without a group@karlcow the updated regex looks good, thanks!. ^_^ If you want to commit that, I can push to Heroku. Or I can make a commit in the morning.
@miketaylr Done.
Right now,
set_label
will grab everything in the foo from<!-- @browser: foo -->
, appendbrowser-
to it and set that as the label. So if you have@browser: foo nightly 41
you getbrowser-foo-nightly-41
which isn't great.