Fix CI KeyError from missing jsonschema format checkers - #22
Merged
Conversation
Bare jsonschema omits date-time/uri/duration/hostname checkers, so FormatChecker(formats=ASSERTED_FORMATS) raised KeyError and broke python, lean, and validate-release-chain jobs. Depend on jsonschema[format-nongpl], pin the extras in requirements.lock, and fail with an actionable error if asserted formats are missing.
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.
Summary
python,lean, andvalidate-release-chainfailed on main after PR Phase 0-7: correctness, protocol hardening, and release-quality gates #6 becausepcscrashed on import withKeyError: 'date-time'when constructingFormatChecker(formats=ASSERTED_FORMATS).jsonschemaonly registers those format checkers when optional format extras are installed; CI installs did not include them.jsonschema[format-nongpl], pin the extras inpython/requirements.lock, harden format-checker construction with a clear error, and document the requirement.Test plan
KeyError: 'date-time'in a clean venv without format extraspip install -c requirements.lock -e '.[dev]'thenpcs capabilitiespytest -q(771 passed, 11 skipped)pcs validate-release-chain,pcs schema check,pcs examples checklake build PCSandlake build PFCorepython,lean, andvalidate-release-chainare green on this PR