condprof-addons.rst (4324B)
1 CondProf Addons 2 =============== 3 4 CondProf Addons is a linter for condprof customization JSON files (see :searchfox:`testing/condprofile/condprof/customization`), 5 it reports linting errors if: 6 7 - any of the addons required by the customization files (e.g. see :searchfox:`testing/condprofile/condprof/customization/webext.json`) 8 is not found in the tar file fetched through the `firefox-addons` fetch task (see :searchfox:`taskcluster/kinds/fetch/browsertime.yml`) 9 - or the expected `firefox-addons` fetch task has not been found 10 11 Run Locally 12 ----------- 13 14 The mozlint integration of condprof-addons can be run using mach: 15 16 .. parsed-literal:: 17 18 $ mach lint --linter condprof-addons <file paths> 19 20 Alternatively, if the ``--linter condprof-addons`` is omitted, the ``condprof-addons`` will still be selected automatically if 21 any of the files paths passed explicitly is detected to be part of the condprof customization directory. 22 23 The ``condprof-addons`` will also be running automatically on ``mach lint --outgoing`` if there are customization files changes 24 detected in the outgoing patches. 25 26 Run on Taskcluster 27 ------------------ 28 29 The condprof-addons job shows up as ``misc(condprof-addons)`` in the linting job. It should run automatically if changes are made 30 to condprof customization JSON files. 31 32 Fix reported errors 33 ------------------- 34 35 XPI file is missing from the firefox-addons.tar archive 36 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 37 38 This linting errors is expected to be reported if the linter detected that a confprof customization file 39 requires an addon but the related xpi filename is not included in the firefox-addons.tar file fetched 40 through the `firefox-addons` fetch task (see :searchfox:`taskcluster/kinds/fetch/browsertime.yml`). 41 42 If the patch or phabricator revision is not meant to be landed, but only used as a temporary patch 43 pushed on try or only applied locally (e.g. to run the tp6/tp6m webextensions perftests with a given 44 third party extension installed to gather some metrics and/or GeckoProfiler data), then it can be 45 safely ignored. 46 47 On the contrary, if the patch or phabricator revision is meant to be landed on mozilla-central, 48 the linting error have to be fixed before or along landing the change, either by: 49 50 - removing the addition to the customization file if it wasn't intended to include that addon to all runs 51 of the tp6/tp6m webextensions perftests 52 53 - updating the `firefox-addons` fetch task as defined in :searchfox:`taskcluster/kinds/fetch/browsertime.yml` 54 by creating a pull request in the github repository where the asset is stored, and ask a review from 55 a peer of the `#webextensions-reviewer` and `#perftests-reviewers` review groups. 56 57 firefox-addons taskcluster config 'add-prefix' attribute should be set to 'firefox-addons/' 58 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 59 60 If this linting error is hit, then the `firefox-addons` task defined in :searchfox:`taskcluster/kinds/fetch/browsertime.yml` 61 is missing the `add-prefix` attribute or its value is not set to the expected 'firefox-addons/' subdir name. 62 63 This is enforced as a linting rule because when the condprof utility is going to build a conditioned profile 64 for which some add-ons xpi files are expected to be sideloaded (see :searchfox:`testing/condprofile/condprof/customization.webext.json`), 65 to avoid re-downloading the same xpi from a remote urls every time the conditioned profile is built on the build infrastructure 66 (which for tp6/tp6m perftests will happen once per job being executed) condprof is going to look first if the expected xpi file 67 names are already available in `$MOZ_FETCHES_DIR/firefox-addons`. 68 69 firefox-addons taskcluser fetch config section not found 70 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 71 72 This linting error is hit if the linter does not find the expected `firefox-addons` task defined in :searchfox:`taskcluster/kinds/fetch/browsertime.yml` 73 or it is missing the expected `fetch` attribute. 74 75 Configuration 76 ------------- 77 78 ConfProf Addons does not currently provide any configuration files. 79 80 Sources 81 ------- 82 83 * :searchfox:`Configuration (YAML) <tools/lint/condprof-addons/yml>` 84 * :searchfox:`Source <tools/lint/condprof-addons/__init__.py>` 85 * :searchfox:`Test <tools/lint/test/test_condprof_addons.py>`