-
Notifications
You must be signed in to change notification settings - Fork 95
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
Replace validation testing with JSON Schema v7 compatible libraries #499
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the Java validator will default to json schema v4 unless the schema specifies a draft via the $schema
keyword or the validator is built with specific options to control the draft in use. It looks like what we're doing here matches the configuration in ingestion-beam, so that's good. Just noting that this PR does not mean we are actually using draft 7 yet. We can address migrating versions later.
I'm really happy to see that it's possible to use the Java library from python in this way. Well done in finding the machinery to make that happen.
So, this approach looks great. I'd recommend tagging @relud for additional eyes on the pytest code.
Co-Authored-By: Jeff Klukas <[email protected]>
This is an issue parsing with org.json
@relud r?, in particular with respect to the pytest configuration for generating tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it.
Integration report for "Add missing objects in java tests"Report for upstream No changes detected. |
3bd20bf 2020-02-12 13:03:15 -0800 Ignore only build at root directory; add java ignores (#506) 115682f 2020-02-11 17:53:36 -0800 Fix CI on master (#504) 815522b 2020-02-12 02:37:35 +0100 Bug 1602463 - Add a schema for the new default-browser ping (#495) f8f7c08 2020-02-11 14:28:36 -0800 Replace validation testing with JSON Schema v7 compatible libraries (#499) 457f05e 2020-02-11 12:19:49 -0800 Add validation test for null devices in syncs 7c8aa57 2020-02-11 12:19:49 -0800 Bug 1614418 allow null for syncs device versions 4017e78 2020-02-11 11:58:35 -0800 Add initial GRAVEYARD document (#502)
3bd20bf 2020-02-12 13:03:15 -0800 Ignore only build at root directory; add java ignores (#506) 115682f 2020-02-11 17:53:36 -0800 Fix CI on master (#504) 815522b 2020-02-12 02:37:35 +0100 Bug 1602463 - Add a schema for the new default-browser ping (#495) f8f7c08 2020-02-11 14:28:36 -0800 Replace validation testing with JSON Schema v7 compatible libraries (#499) 457f05e 2020-02-11 12:19:49 -0800 Add validation test for null devices in syncs 7c8aa57 2020-02-11 12:19:49 -0800 Bug 1614418 allow null for syncs device versions 4017e78 2020-02-11 11:58:35 -0800 Add initial GRAVEYARD document (#502) 023537f 2020-02-10 09:31:40 -0400 bug 1604312 - Scalars can now appear in 'deletion-request' pings. (#481) fb3c473 2020-02-07 16:43:00 -0500 error schema updates based on review 30947fe 2020-02-07 16:43:00 -0500 Bug 1613225 Add descriptions to payload_bytes_* fields 829c82e 2020-02-05 14:14:28 -0800 Bug 1595063 - Add ua attribution to environment data (#494) 63dcb42 2020-02-03 16:49:19 -0500 anyOf -> oneOf 0739fed 2020-02-03 16:49:19 -0500 Add CHANGELOG 36c965f 2020-02-03 16:49:19 -0500 1612940: Allow "null" extras in experiment
This will fix #332, and also introduces the
jsonschema
python package in case testing is done locally. There are 3 failing tests, 1 in python and 2 in java.I've tested this on my local machine (without java configured, because
pyjnius
was not playing well with my macOS instance) which will skip the java tests, and in the docker image which can run either. When running in docker, I recommend the-n
flags.pytest
scripts/mps-test -k python
scripts/mps-test -k java
The
scripts/mps-build
andscripts/mps-test
are helpers for this workflow.Current errors:
There are still a few more things to do, but this should be in a reviewable state.
Checklist for reviewer:
.circleci/config.yml
) will cause environment variables (particularly credentials) to be exposed in test logsintegration
CI test by pushing this revision as discussed in the README and review the report posted in the comments.For glean changes:
include/glean/CHANGELOG.md