Support Transitioning the Vocab Configuration for Models
Categories
(Firefox :: Translations, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox138 | --- | fixed |
People
(Reporter: nordzilla, Assigned: nordzilla)
Details
Attachments
(2 files)
Description
There may be situations where we and to introduce a minor version bump to a model, e.g. 2.0 => 2.1 that changes the configuration of the model from using a shared vocab to a split vocab, or the converse.
In such a case, this would leave the shared v2.0 vocab file in Remote Settings, while publishing all new files for the v2.1 configuration. With our current logic, all three vocabs would be pulled in as the highest version of their respective record type:
vocab v2.0srcvocab v2.1trgvocab v2.1
And this will cause us to throw an error due to all three vocab files being loaded, when the reality is that we should be ignoring the vocab v2.0 file due to not matching the current highest version, even though it is, itself, the highest version shared-vocab record that exists.
We need to add extra logic to guard against this scenario, and ensure that only the files matching the current configuration are pulled from Remote Settings.
Steps to Implement
- Add an extra guard that ensures only files matching the max-version
"model"file-type record are pulled from Remote Settings.
Tests to Implement
- Add a test that ensures the correct configuration is pulled from Remote Settings when bumping a model's minor version from shared to split vocab.
- Add a test that ensures the correct configuration is pulled from Remote Settings when bumping a model's minor version from split to shared vocab.
| Assignee | ||
Comment 1•1 year ago
|
||
Renames a few variables, improving readability, and making
logical changes of the subsequent patch easier to follow.
| Assignee | ||
Comment 2•1 year ago
|
||
This ensures that our source code can cleanly handle the versioning
considerations if a Translation model configuration gets a minor-version
update transitioning from a shared vocab config to a split vocab config,
or the converse.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 4•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b21a476965aa
https://hg.mozilla.org/mozilla-central/rev/219ef506bd05
Description
•