Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use modern version of validator to validate Dependabot configuration files #420

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Nov 23, 2023

The repository infrastructure validates the project's own, as well as the "asset", Dependabot configuration files against the JSON schema. The ajv-cli JSON schema validator is used to perform the validation.

Support for the JSON schema "Draft-04" specification was dropped at the 4.0.0 release of ajv-cli. This means that the previous version (3.3.0) must be used when validating files against a JSON schema based on the "Draft 4" specification. When working with schemas based on newer specification versions, it is preferred to use the latest version of ajv-cli in order to benefit from the ongoing development on the tool. For this reason, two different versions of ajv-cli are used.

At the time the system for validating the Dependabot configuration files was set up, that JSON schema was based on the "Draft-04" specification, so ajv-cli 3.3.0 was used. Since that time the schema was updated to "Draft-07" so it is now possible to use the modern ajv-cli for this validation.

@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Nov 23, 2023
@per1234 per1234 self-assigned this Nov 23, 2023
@per1234
Copy link
Contributor Author

per1234 commented Nov 23, 2023

The failure of the "Check markdownlint Configuration" workflow is unrelated to the changes proposed here. That is fixed by #419.

…files

The repository infrastructure validates the project's own as well as the "asset" Dependabot configuration files against
the JSON schema. The ajv-cli validator is used to perform the validation.

Support for the JSON schema "Draft-04" specification was dropped at the 4.0.0 release of ajv-cli. This means that the
previous version (3.3.0) must be used when validating files against a JSON schema based on the "Draft 4" specification.
When working with schemas based on newer specification versions, it is preferred to use the latest version of ajv-cli in
order to benefit from the ongoing development on the tool. For this reason, two different versions of ajv-cli are used.

At the time the system for validating the Dependabot configuration files was set up, that JSON schema was based on the
"Draft-04" specification, so ajv-cli 3.3.0 was used. Since that time the schema was updated to "Draft-07" so it is now
possible to use the modern ajv-cli for this validation.
@per1234 per1234 merged commit e9c50c4 into arduino:main Nov 30, 2023
47 checks passed
@per1234 per1234 deleted the update-dependabot-validator branch December 5, 2023 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants