Closed Bug 1185930 Opened 10 years ago Closed 10 years ago

Accept dash suffixes in langpack versions

Categories

(Marketplace Graveyard :: Validation, enhancement, P4)

Avenir
enhancement

Tracking

(Not tracked)

RESOLVED FIXED
2015-09-22

People

(Reporter: stas, Assigned: stas)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

48 bytes, text/x-github-pull-request
mat
: review+
Details | Review
We need a way to support partner modifications in langpacks, and the solution that we'd like to go with is to overload the version of the Firefox OS to carry the information about the partner. So 2.2 would be Mozilla's vanilla version while 2.2-x could be the verrsion shipped by partner X. This will require small changes to the Gaia's build system and the Marketplace app validator to make both accept such version numbers. I would also be helpful to not limit the possible Gaia versions by hardcoding them in https://github.com/mozilla/app-validator/blob/7762a030a2a5a01cd70173d99167efc771239304/appvalidator/specs/webapps.py#L321 For instance, 3.0 is now 2.5. Can we use a more lax form of version checking here?
We could use a regexp instead ; or just let it be free-form, but that's dangerous, a typo could be hard to detect then. Note that we still need the version string to match whatever FxOS settings page sends using the Web Activity.
(In reply to Mathieu Pillard [:mat] from comment #1) > We could use a regexp instead ; or just let it be free-form, but that's > dangerous, a typo could be hard to detect then. Right. I don't think we need to make it easy to create a new version, so I'm fine with having a strict verification step. OTOH, I wonder what the best process to update this for you would be. Maybe some kind of settings/langpack-versions.(py|josn) file that I could submit pull requests to? > Note that we still need the > version string to match whatever FxOS settings page sends using the Web > Activity. Right, this is the same version. So the webactivity should support 2.2-x and 2.5. Should I file a separate bug for this?
We don't need another bug, as long as the version matches it should work - the frontend does not verify the version string, it just sends it to the API which does an exact match. I feel like whitelisting is going to be a pain if we need to deal with builds from partners etc, so I'd prefer a simple regexp. Here is the thing though: should a langpack created for 2.2 work with 2.2-x ? And vice-versa ?
(In reply to Mathieu Pillard [:mat] from comment #3) > I feel like whitelisting is going to be a pain if we need to deal with > builds from partners etc, so I'd prefer a simple regexp. Here is the thing > though: should a langpack created for 2.2 work with 2.2-x ? And vice-versa ? I think we can consider making this work in one direction: fxos_version=2.2-x could return 2.2 langpacks, too. If we forbid this, we'd need to make sure version numbers in partner builds only add the suffix when localizations are modified. Zibi, what do you think? (Ideally, partner builds should not come with changes to localizations and should then be allowed to use vanilla versions.)
Flags: needinfo?(gandalf)
Severity: normal → enhancement
Priority: -- → P4
I'd prefer to start with strict matches where we don't show any matching langpacks for partner builds who use custom build versions unless they provide custom langpacks. I'd prefer that over accidentally providing incomplete langpacks. We could even maybe add a pref for partners to choose langpack "channel"?
Flags: needinfo?(gandalf)
In bug 1202407 I'd like to rename moz.b2g.version to something more langpack-specific, which would effectively be the name of a langpack "channel", as you suggested. Maybe we should even use the word "channel". If the meaning of this settings is clear, the current implementation in the Marketplace should be sufficient: asking for 2.5-x would only return 2.5-x langpacks. Hopefully, this would encourage partners to stay on the official langpack channel. My personal preference would be to go for a regexp, but I also see benefits of having strict control here. Mat, if we stick to hardcoding strict version matches, what's the update frequency of app-validator? How much in advance would we need to know that a new version needs to be accepted?
Flags: needinfo?(mpillard)
The app-validator is updated by simply bumping a requirement in mozilla/zamboni, which is pushed weekly (every Tuesday).
Flags: needinfo?(mpillard)
Replied too quickly: we tag for the push on Friday (leaving a couple days for QA to verify there are no big regressions) so ideally, we'd need roughly a one week warning for validator changes.
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #5) > I'd prefer to start with strict matches where we don't show any matching > langpacks for partner builds who use custom build versions unless they > provide custom langpacks. > I'd prefer that over accidentally providing incomplete langpacks. Agreed. Let's start with 2.5-x only returning 2.5-x langpacks. As far as validation goes, we still have control over who can submit new langpacks. If a partner sets langpack.channel to something non-standard, they still need to have permissions to upload corresponding langpacks to the Marketplace. Zibi, do you think that's enough for now? I'm a bit afraid of the manual labor required to enable vanilla langpacks for new versions of Gaia. I think I'd prefer the regexp approach. What's your opinion on this?
Flags: needinfo?(gandalf)
Good point. wfm!
Flags: needinfo?(gandalf)
Attached file Pull request
This regular expression will match the following versions: 2.5 2.10 2.3-p 2.10-partner 2.5-partner_2_5_6 I'll add tests today and request reviews.
Assignee: nobody → stas
Status: NEW → ASSIGNED
Comment on attachment 8661110 [details] [review] Pull request Mat, how does this look to you?
Attachment #8661110 - Flags: review?(mpillard)
Attachment #8661110 - Flags: review?(mpillard) → review+
Target Milestone: --- → 2015-09-22
Thanks for the help, closing as fixed.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Can you please add some STRs to this bug or mark it as [qa-]?
We don't currently have partner langpacks to test and I think the unit test should be enough for now.
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: