marocchino / validate-dependabot

validate dependabot yaml
MIT License
23 stars 5 forks source link

JSON schema error while running action #644

Open annabalquin opened 11 months ago

annabalquin commented 11 months ago

On running the action, encountered the following error:

Error: no schema with key or ref "http://json-schema.org/draft-07/schema#"

timothyfroehlich commented 11 months ago

Same: https://github.com/google/automotive-design-compose/actions/runs/6951328475/job/18913118404

GitHub
Fix build scans · google/automotive-design-compose@b1d1167
Automotive Design for Compose is an extension to Jetpack Compose that allows every screen, component, and overlay of your Android App to be defined in Figma, and lets you see the latest changes to ...
janedbal commented 11 months ago

Same: https://github.com/shipmonk-rnd/doctrine-hint-driven-sql-walker/actions/runs/7044685714/job/19172875221?pr=6

GitHub
dependabot: add validation job · shipmonk-rnd/doctrine-hint-driven-sql-walker@8a0fb3b
Doctrine's SqlWalker that allows hooking multiple handlers via ->setHint() while each can edit produced SQL or its part. - dependabot: add validation job · shipmonk-rnd/doctrine-hint-driven-...
smolse commented 11 months ago

We have the same issue in a private repo. I took some time today to investigate why this failure started happening.

So, it looks like a couple of weeks ago the dependabot-2.0 schema in the schemastore was updated to use the meta-schema draft-07 instead of the meta-schema draft-04: https://github.com/SchemaStore/schemastore/blame/224b17f25bca8843288f5cdca6de731cb6117924/src/schemas/json/dependabot-2.0.json#L3.

However, ajv version in this project is too old and doesn't support draft-07. I believe support for draft-07 was added in ajv version 6.

smolse commented 11 months ago

I created a pull request for a possible solution: #648

@marocchino could you please take a look at it when you have a chance? I haven’t touched JS in years, so feel free to modify the PR as needed if something is wrong, or close it and create another one, if a better fix is possible.