Simplify sentry logic for :lang substitutions

NEW
Unassigned

Status

Webtools
Bouncer
P3
normal
5 months ago
2 months ago

People

(Reporter: nthomas, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 obsolete attachment)

(Reporter)

Description

5 months ago
We have this complicated logic for how sentry should replace :lang to check locations. It's from the days we had volunteer mirrors and they would rsync files in, possibly slowly and often after we had shipped, and we'd wait until they had the last locale before enabling them for a product. Last in the alphabetical-sort sense, so usually zh-TW.

These days the CDNs have all or none of the files, and we set that up before shipping, so we can just use en-US since that's reliably present.
(Reporter)

Comment 1

5 months ago
Created attachment 8889723 [details] [review]
Use en-US for all :lang substitutions
Attachment #8889723 - Flags: review?(oremj)
(Reporter)

Updated

5 months ago
See Also: → bug 1351985

Comment 2

5 months ago
We are running the sentry here: https://github.com/mozilla-services/go-bouncer/tree/master/go-sentry. I can look in to porting your patch though, thanks!

Comment 3

5 months ago
Looks like the equivalent section would be here: https://github.com/mozilla-services/go-bouncer/blob/master/go-sentry/sentry/sentry.go#L110

Comment 4

5 months ago
I'm wondering if we even need sentry anymore. We control bouncer, the CDN and mozilla.org, so there probably isn't a good reason to check, via sentry, that the file is actually in place.
(Reporter)

Updated

5 months ago
Attachment #8889723 - Attachment is obsolete: true
Attachment #8889723 - Flags: review?(oremj)
(Reporter)

Comment 5

5 months ago
So, in practical terms bouncer would enable new locations as soon as they were added, and would serve a 302. If the location isn't present yet, or someone made a typo, then we'd get a 404 from the CDN rather than bouncer  ?

Comment 6

5 months ago
Yes, exactly. It would just redirect to its configured location always.
(Reporter)

Comment 7

5 months ago
I can't think of any reasons that would be a problem, but will check with other people in RelEng. Either way I probably won't be the one touching the code.
Assignee: nthomas → nobody
Flags: needinfo?(nthomas)

Comment 8

2 months ago
Currently spinning 2.49.1 and will most likely hit the issue as mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1351985#c8.  

That said..  

I'll do a pr against https://github.com/mozilla-services/go-bouncer/blob/master/go-sentry/sentry/sentry.go#L124

Comment 9

2 months ago
nthomas, ewong: can you both review https://github.com/mozilla-services/go-bouncer/pull/175
Flags: needinfo?(ewong)

Comment 10

2 months ago
(In reply to Jeremy Orem [:oremj] from comment #9)
> nthomas, ewong: can you both review
> https://github.com/mozilla-services/go-bouncer/pull/175

done.
Flags: needinfo?(ewong)
(Reporter)

Comment 11

2 months ago
The PR lgtm.
Flags: needinfo?(nthomas)

Comment 12

2 months ago
:oremj,  would you happen to have merged the PR to production (or whatever
the right terminology is)?
c.f. c#12
Flags: needinfo?(oremj)

Comment 14

2 months ago
No, I plan on doing a deploy next week.
Flags: needinfo?(oremj)
You need to log in before you can comment on or make changes to this bug.