Closed Bug 668724 Opened 14 years ago Closed 14 years ago

Bug 654152 broke the ability of all-locales to be read without specifying an path on web.

Categories

(Release Engineering :: General, defect, P3)

x86
Windows 7
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Callek, Assigned: Callek)

References

Details

(Whiteboard: [l10n])

Attachments

(2 files, 1 obsolete file)

Bug 654152 broke the backwards-compat way of having all-locales in source repo, unless you specify the hg url by hand to the builder. This also breaks the ability for buildbot to poll the all-locales file based on the sourcestamp rev we are using. From Bug 654152 (In reply to comment #27) > Comment on attachment 533772 [details] [diff] [review] [review] > [buildbotcustom] allowing passing localesURL to L10nMixin > > > > def __init__(self, platform, repo='http://hg.mozilla.org/', branch=None, > > baseTag='default', localesFile="browser/locales/all-locales", > >- locales=None): > >+ locales=None, localesURL=None): > >+ """ > >+ You can call this class with either a defined list of locales or > >+ a URL that contains the list of locales > >+ """ > > self.branch = branch > > self.baseTag = baseTag > >- self.repo = repo > >- self.localesFile = localesFile > >+ self.localesURL = localesURL if localesURL else "%s%s/raw-file/%s/%s" \ > >+ % (repo, branch, revision or self.baseTag, localesFile) > > >@@ -141,25 +145,22 @@ class L10nMixin(object): > > in the scheduler OR it returns a Deferred. > > > > You want to call this method via defer.maybeDeferred(). > > """ > > if self.locales: > > log.msg('L10nMixin.getLocales():: The user has set a list of locales') > > return self.locales > > else: > >- revision = revision or self.baseTag > >- localesURL = "%s%s/raw-file/%s/%s" \ > >- % (self.repo, self.branch, revision, self.localesFile) > >- log.msg("L10nMixin:: Getting locales from: "+localesURL) > >+ log.msg("L10nMixin:: Getting locales from: "+self.localesURL) > > # we expect that getPage will return the output of "all-locales" > > # or "shipped-locales" or any file that contains a locale per line > > # in the begining of the line e.g. "en-GB" or "ja linux win32" > > # getPage returns a defered that will return a string > >- d = getPage(localesURL, timeout = 5 * 60) > >+ d = getPage(self.localesURL, timeout = 5 * 60) > > d.addCallback(lambda data: ParseLocalesFile(data)) > > return d > > Since this is a defferred section, moving the localesURL generation up to > init, actually drops the potential to use a source-stamps "revision" here. > Which used to exist. > > I also haven't verified, but I suspect the else clause that creates the > localesURL would throw since revision is not in scope there. > > What I would suggest/have suggested is to "generate" the localesURL where it > is now, but allow us to replace with %s{revision} even in the config based > url. But at least fixing the basic generation case is requested. (That said, > it is fairly easy for me to import this code in a way that won't break > SeaMonkey, so if it is desired to drop the support for using a sourcestamp > revision, I'm ok with that.) (In reply to comment #28) > Sorry Callek this already went live a while ago but thanks for the review. > Feel free to file a bug for any follow up work and we'll deal with it there.
Priority: -- → P2
Whiteboard: [l10n]
Priority: P2 → P3
Attached patch v1.0 (obsolete) — Splinter Review
Fix it. This may look odd at first glance, but if I try and do this without splitting the self.localesURL assignment to multi lines, any attempt at % formatting throws (due to revision not being in scope), but by leaving that format char in the localesURL until its used there, we have the option of expanding later. This also has the benefit that if we ever wish to go back to in-repo localesURL we have the option of easily specifying %(revision)s in the URL we pass to this class to have it properly expanded. If its desired to _DROP_ this backwards compat ability, lets do that instead, but I don't forsee me doing it. (since it has slightly further reaching stuff, (dead 'revision', unneeded defer.maybeDeferred etc.
Assignee: armenzg → bugspam.Callek
Status: NEW → ASSIGNED
Attachment #545578 - Flags: review?(armenzg)
Attachment #545578 - Flags: review?(aki)
Attachment #545578 - Flags: feedback?(jhopkins)
Attached patch v1.1Splinter Review
Updating per IRC suggestion by nthomas
Attachment #545578 - Attachment is obsolete: true
Attachment #545586 - Flags: review?(armenzg)
Attachment #545586 - Flags: review?(aki)
Attachment #545586 - Flags: feedback?(jhopkins)
Attachment #545578 - Flags: review?(armenzg)
Attachment #545578 - Flags: review?(aki)
Attachment #545578 - Flags: feedback?(jhopkins)
Attachment #545586 - Flags: feedback?(jhopkins) → feedback+
Comment on attachment 545586 [details] [diff] [review] v1.1 Looks good to me.
Attachment #545586 - Flags: review?(armenzg) → review+
Attachment #545586 - Flags: review?(aki) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Attachment #545586 - Flags: checked-in+
Landed on production and reconfigured.
When deploying this to seamonkey I noticed one thing I didn't catch in my brief testing earlier. Caught with some buildbot master weird Unhandled Execptions (from a Deferred) that I had to expand out to notice the path was looking for "None" as a branch. This should correct that, and ensure that if anyone wants to do it this way they are sure to pass in a branch or get reconfig errors
Attachment #564318 - Flags: review?(armenzg)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 564318 [details] [diff] [review] don't use branch=None Good catch!
Attachment #564318 - Flags: review?(armenzg) → review+
Attachment #564318 - Flags: checked-in+
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: