It's come up a few times that we've released snippets that are problematic in some way (e.g. bug 682944, and more recently a snippet that was erroneously telling users that their build was out of date).
I don't know exactly how the snippet service works, but it would be ideal if it were possible to easily audit the source of all snippets that are currently being sent to Firefox users, and their relevant parameters.
So, just as a quick refresher:
Snippets are chunks of HTML that are associated with Client Match Rules. These Rules specify strings or regexes that match things like browser version, OS version, release channel, or locale. The rules determine who a snippet goes to.
Currently, we have a small set of automated tests that periodically run on the snippets service and assert a few things, such checking for broken links. We also have a small process in place for testing interactive snippets that might break the about:home page like the one that caused bug 682944.
I think that a human-driven audit would be unmaintainable given the amount of snippets in production at any given time (the last import I was involved in added a couple hundred new snippets, including other locales).
An automatic audit should be able to be implemented by out automated tests.
I'm not asking that we put in place any requirements for human review, or any kind of additional restrictions on whatever standard practice you use to publish snippets.
As a Firefox developer, I just personally want to be able to look and see what we're pushing to Firefox users when it comes up as a potential issue. There's no visibility into the snippets service at all for anyone outside of the people who have access to the snippets service, and I'd like to change that.
How would you want the client match rules to be displayed? Just a list showing what fields and what the regexes are for each field?
I'll mock up what I'm thinking of and attach it tomorrow.
That sounds good. Whatever is easiest would be fine as a first step - it doesn't have to be pretty :)
Created attachment 614583 [details]
Is this what you were thinking about?
If that works, we can throw this over to cmore and lforrest so they can determine when we want to fit it in.
Comment on attachment 614583 [details]
Yeah, this looks good. It would be cool if you could group (or even sort) by match rules, but this is a nice first step.
+1 to Gavin.
Michael, any updates here? I know this isn't a high priority, but since it seems to be relatively easy to do it'd be nice to get this in production :)
Michael is on PTO all this week due to him moving from Mountain View to Florida. Then next week he is at the Engagement offsite from Tuesday-Thursday. He will not be completely available until May 28th. We will schedule this work with our upcoming development sprints and that date is not yet scheduled. As soon as we have an estimate, we will get back in this bug.
Fixed in https://github.com/mozilla/home-snippets-server/commit/97a924f279a2af9e9c5eef7aaf21d474649ef1b9 and https://github.com/mozilla/home-snippets-server/commit/87d8fc69c2d93af1c7c9a09ae0947ed7c17d2e52
IIRC this should be up on staging soon at https://snippets.stage.mozilla.com/show_all_snippets (if stage hasn't been updated, it will show a blank page).
If stage isn't on an auto-update schedule, then I'll file a push bug shortly to get it up.
This is now definitely available at https://snippets.stage.mozilla.com/show_all_snippets
Gavin: How does the page look to you?
Reopening, as the concern was brought up that this page isn't cached and could be used to overload the snippets server. I'm thinking a 24 hour cache will work fine here?
Should we be seeing all snippets at https://snippets.stage.mozilla.com/show_all_snippets? I'm not seeing everything that's currently live in GA. For example, I'm looking for our Collusion snippet. Copy reads:
"Who's tracking you online? Watch the TED Talk from Mozilla CEO Gary Kovacs to find out."
Winston: We should only be seeing snippets that are live on stage, so anything on production won't show up.
(In reply to Michael Kelly [:mkelly] from comment #11)
> Gavin: How does the page look to you?
Looks perfect! Thanks a lot for getting this done!
This has been pushed to production. Final URL: https://snippets.mozilla.com/show_all_snippets