Closed Bug 1749064 Opened 9 months ago Closed 6 months ago

Create a pytest suite to cover JSONSchema to WebIDL python scripts GenerateWebIDLBindings.py / InspectJSONSchema.py

Categories

(WebExtensions :: General, task, P2)

task
Points:
3

Tracking

(firefox100 fixed)

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: rpl, Assigned: rpl)

References

(Blocks 1 open bug)

Details

(Whiteboard: [addons-jira])

Attachments

(2 files)

While working on the WebIDL bindings for the WebExtensions APIs exposed to the MV3 background service worker (tracked by the issues that blocks the meta Bug 1609923) we are definitely going to need further changes and improvements to the python scripts used to bootstrap and keep in sync the WebIDL definitions with the related JSONSchema data (e.g. like in Bug 1748714, which is related to changes needed cover a corner case that we caught by running all alarms API tests in a background service worker as part of Bug 1724026).

We should cover these python scripts (GenerateWebIDLBindings.py and InspectJSONSchema.py) with some automated tests to make it easier to improve this python scripts (while reducing the risks to regress the expected behaviors).

Attachment #9258393 - Attachment description: WIP: Bug 1749064 - Add pytest suite to cover JSONSchema to WebIDL python scripts GenerateWebIDLBindings.py. r?robwu! → Bug 1749064 - Add pytest suite to cover JSONSchema to WebIDL python scripts GenerateWebIDLBindings.py. r?robwu!

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:rpl, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.

Flags: needinfo?(rob)
Flags: needinfo?(lgreco)
Flags: needinfo?(rob)

The accepted patch was still pending on me confirming if the test was already running on push to try or not, or something was still missing, and I just verified that it wasn't yet.

After digging into our similar python unit tests added in mozilla-central, I confirmed that adding PYTHON_UNITTEST_MANIFESTS to a moz.build file isn't enough to ensure the python unit, and the python test suite need to be explicitly hooked up into the taskcluster config.

I've just added a patch that does hook up the new python tests into taskcluster/ci/source-test/python.yml as a new subsuite named webext-python and verified it did run in a try push including the resulting job name source-test-python-webext-linux1804-64/opt-py3 (by selecting it explicitly from mach try fuzzy --artifact --full):

Flags: needinfo?(lgreco)
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/0db98cf4b8f4
Add pytest suite to cover JSONSchema to WebIDL python scripts GenerateWebIDLBindings.py. r=robwu
https://hg.mozilla.org/integration/autoland/rev/02451023e58b
Add WebExtensions Python Subsuite to TC config. r=taskgraph-reviewers,robwu,jmaher
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.