feat: Add lock jobs and improve job JSON schema validations#370
Merged
feat: Add lock jobs and improve job JSON schema validations#370
Conversation
Contributor
Author
stig
reviewed
Oct 6, 2025
stig
approved these changes
Oct 6, 2025
stig
left a comment
There was a problem hiding this comment.
I'd like to see the commits adding code and the tests for that code squashed together. I'm happy for the documentation and formatting changes being separate commits.
bc8386c to
e1af8aa
Compare
Contributor
Author
@stig I have squashed relevant code change commits together with their tests |
e1af8aa to
384021d
Compare
…s for release, no-op, approval, lock and unlock job types
384021d to
1af1dc8
Compare
SashaLsnko
approved these changes
Oct 6, 2025
tshen815
approved these changes
Oct 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Jira: https://circleci.atlassian.net/browse/PIPE-5266
Description
New job types
This PR adds support for two job types:
lockunlockImproved schema validation
While these job types are not explicitly explained in the docs, they are the underling job types that our serial group feature uses under the hood.
This MR also also adds improved validations for other job types that we already had:
approval/no-opjobs don't need any additional parameters to be validlock/unlockrequire akey:parameter to be specifiedreleasejobs require aplan_name:parameter to be specifiedOther changes
HACKING.mdto explain the difference between our schemas and when to update which oneImplementation details
To improve the experience of editing these schema.json files, I ran the default vscode JSON auto-formatter with 4 spaces on the
schemaandpublicschemafiles. This makes the diff hard to read, so this commit is where I actually add the new re-usable jobDefinition with all the new validations. I re-use this jobDefinition ref inside the jobs: section and the orbs: jobs: section.In order to add the complex JSON schema rules, I needed to use if/then/else syntax which was introduced in JSON schema draft-07. I bumped the version of
schema.json.How to validate
Following the steps in
HACKING.mdto run the language server extension in VScode would be the easiest way to verify it works in your editor!