| Message ID | 20260406172110.2050236-1-rob.woolley@windriver.com |
|---|---|
| Headers | show |
| Series | bitbake-setup JSON Schema: Fix linting errors | expand |
On Mon Apr 6, 2026 at 7:21 PM CEST, Rob Woolley via lists.openembedded.org wrote: > This series fixes some linting errors in the JSON Schema. Problems > were found using the https://github.com/sourcemeta/jsonschema tool. > > Here are the steps used to install and use the tool to lint the schemas: > > python3 -m venv venv > source venv/bin/activate > pip install sourcemeta-jsonschema > jsonschema lint bitbake-setup.schema.json > jsonschema lint layers.schema.json > > This allowed me to use jsonschema to validate the BitBake Configuration File: > jsonschema validate path/to/bitbake-setup.schema.json oe-nodistro-master.conf.json > > There are 2 outstanding types of linting errors related to the use of hyphen > in the property names and the enum currently having only one value: > > Set `properties` to identifier names that can be easily mapped to programming > languages (matching [A-Za-z_][A-Za-z0-9_]*) (simple_properties_identifiers). > > An `enum` of a single value can be expressed as `const` (enum_to_const) > > The former would require a larger discussion and potentially increasing the > version number. Updating the enum to include a new version would also resolve > the latter error. > > I do not believe that the changes in this series merit increasing the version > of the schema. > > Resolving these outstanding errors is not necessary for validating the > Bitbake Configuration files. Hi Rob, Thanks for you series. It looks like some selftests are now failing: 2026-04-07 08:44:43,890 - oe-selftest - INFO - bblayers.BitbakeLayers.test_bitbakelayers_setup (subunit.RemotedTestCase) 2026-04-07 08:44:43,891 - oe-selftest - INFO - ... FAIL ... /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-1874443/tmp/work/x86_64-linux/python3-jsonschema-native/4.26.0/recipe-sysroot-native/usr/bin/jsonschema:5: DeprecationWarning: The jsonschema CLI is deprecated and will be removed in a future version. Please use check-jsonschema instead, which can be installed from https://pypi.org/project/check-jsonschema/ from jsonschema.cli import main {'version': '1.0', 'sources': {'bitbake': {'git-remote': {'remotes': {'origin': {'uri': 'https://git.openembedded.org/bitbake'}}, 'branch': 'master', 'rev': 'master'}, 'path': 'bitbake'}}}: {'version': '1.0', 'sources': {'bitbake': {'git-remote': {'remotes': {'origin': {'uri': 'https://git.openembedded.org/bitbake'}}, 'branch': 'master', 'rev': 'master'}, 'path': 'bitbake'}}} is not of type 'array' ... 2026-04-07 08:45:39,329 - oe-selftest - INFO - bblayers.BitbakeLayers.test_bitbakelayers_updatelayer (subunit.RemotedTestCase) 2026-04-07 08:45:39,331 - oe-selftest - INFO - ... FAIL ... 2026-04-07 08:45:39,594 - oe-selftest - INFO - bblayers.BitbakeLayers.test_validate_bitbake_setup_default_registry (subunit.RemotedTestCase) 2026-04-07 08:45:39,594 - oe-selftest - INFO - ... FAIL ... 2026-04-07 08:45:39,819 - oe-selftest - INFO - bblayers.BitbakeLayers.test_validate_examplelayersjson (subunit.RemotedTestCase) 2026-04-07 08:45:39,820 - oe-selftest - INFO - ... FAIL https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3617 https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3499 Can you have a look at the issue? Thanks, Mathieu
Mathieu Dubois-Briand said: > Hi Rob, > > Thanks for you series. > > It looks like some selftests are now failing: > > 2026-04-07 08:44:43,890 - oe-selftest - INFO - bblayers.BitbakeLayers.test\_bitbakelayers\_setup (subunit.RemotedTestCase) > 2026-04-07 08:44:43,891 - oe-selftest - INFO - ... FAIL > ... > /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-1874443/tmp/work/x86\_64-linux/python3-jsonschema-native/4.26.0/recipe-sysroot-native/usr/bin/jsonschema:5: DeprecationWarning: The jsonschema CLI is deprecated and will be removed in a future version. Please use check-jsonschema instead, which can be installed from <https://pypi.org/project/check-jsonschema/> > from jsonschema.cli import main > {'version': '1.0', 'sources': {'bitbake': {'git-remote': {'remotes': {'origin': {'uri': '<https://git.openembedded.org/bitbake'}}>, 'branch': 'master', 'rev': 'master'}, 'path': 'bitbake'}}}: {'version': '1.0', 'sources': {'bitbake': {'git-remote': {'remotes': {'origin': {'uri': '<https://git.openembedded.org/bitbake'}}>, 'branch': 'master', 'rev': 'master'}, 'path': 'bitbake'}}} is not of type 'array' > ... > 2026-04-07 08:45:39,329 - oe-selftest - INFO - bblayers.BitbakeLayers.test\_bitbakelayers\_updatelayer (subunit.RemotedTestCase) > 2026-04-07 08:45:39,331 - oe-selftest - INFO - ... FAIL > ... > 2026-04-07 08:45:39,594 - oe-selftest - INFO - bblayers.BitbakeLayers.test\_validate\_bitbake\_setup\_default\_registry (subunit.RemotedTestCase) > 2026-04-07 08:45:39,594 - oe-selftest - INFO - ... FAIL > ... > 2026-04-07 08:45:39,819 - oe-selftest - INFO - bblayers.BitbakeLayers.test\_validate\_examplelayersjson (subunit.RemotedTestCase) > 2026-04-07 08:45:39,820 - oe-selftest - INFO - ... FAIL > > <https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3617> > <https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3499> > > Can you have a look at the issue? > > Thanks, > Mathieu > > \-- > Mathieu Dubois-Briand, Bootlin > Embedded Linux and Kernel engineering > <https://bootlin.com> Hi Mathieu, Thanks for pointing this out. The fix is simply to use brackets to enclose the object in the examples property inside an array. I expanded my testing to include oe-selftest. I just sent out a v2 of the patch series. Cheers, Rob