-
Notifications
You must be signed in to change notification settings - Fork 105
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
Update json-schema dependency #777
Conversation
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec| | |||
spec.add_runtime_dependency 'ffi', '~> 1.9.0' | |||
spec.add_runtime_dependency 'gettext-setup', '~> 0.24' | |||
spec.add_runtime_dependency 'hitimes', '1.3.0' | |||
spec.add_runtime_dependency 'json-schema', '2.8.0' | |||
spec.add_runtime_dependency 'json-schema', '~> 2.8.1' |
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.
Technically speaking, ~> 2.8
might be more suitable (and improve my life as a packager)… What do maintainers think about it?
Thanks for the PR @smortex !! I'm re-running the CI because those failures don't look related... As for Thoughts @rodjek ? Note - this would need a corresponding bump in pdk-vanagon |
Hrmm...Will have to run this locally to see what's up. |
@smortex Still trying to repro this. There's something weird going on. In the meantime, did you want to quickly rebase onto master. |
b36a823
to
d90b096
Compare
I am not able to reproduce the failures on my FreeBSD box (lots of unrelated failures I had not the time to check yet)… Hope to take some time for this in the next days. In the meantime I rebased the commit on top of master. Failures seems to be the very same. |
Oh intersting....
|
Ok.... so https://forgeapi.puppet.com/schemas/task.json holds the json schema for Tasks and lo-and-behold:
|
Looks like we're hitting - voxpupuli/json-schema#424 The specification page still lists ref - https://json-schema.org/specification-links.html#draft-6 |
Bottom line json-schema doesn't support draft 6 (draft 5 and below 😢) and json-schema 2.8.0 just happens to work, whereas 2.8.1 will not. And due to json-schema, in essence, being abandoned (voxpupuli/json-schema#423) I doubt this will ever be addressed. As much as I want to merge this, I don't think we can 😢 |
Do you think it would be possible to switch to draft 5? I would like to avoid to create a FreeBSD port for this release of json-schema to depend on and unbreak pdk… |
Oh no. There is no draft-05
https://json-schema.org/draft-06/json-schema-release-notes.html |
Yeah, I just saw that… I switched to 4 and the test suite pass on my machine. The acceptance test suite does not pass, but event before it did not pass :-/ |
May have to seriously consider moving to https://github.com/davishmcclurg/json_schemer Only problem is the ruby version restriction (2.4+) PDK currently supports 2.1+ |
Version 2.8.0 of the json-schema gem assumed the WIP draft 6 URI would be "http://json-schema.org/draft-06/schema#". It happens that it is in fact "http://json-schema.org/draft/schema#". While this issue was fixe in voxpupuli/json-schema#376 and json-schema 2.8.1 was released with this fix, it does not fix our problem. But since we do not depend on draft-06 features, downgrade to draft-04 (there is no draft-05).
d90b096
to
c90d9e1
Compare
Switching to a previous schema version does not help (but after a second though, the failure you see seems to be caused by a reference to the draft 6 schema from outside of this repository)… No idea what to do next. |
@smortex , @rodjek and I had a chat about this today. The current plan is that we'll be releasing PDK v2.0.0 very early next year, where we'll be dropping EOL ruby. That means we could use the (much better) json_schemer gem and avoid all of these draft issues in In the mean time, I'm going to raise a PR to turn off schema validation but leave the schema code in place and add some failing unit tests e.g. the draft urls should not be "schema.org/draft-06/schema#". |
Closing in lieu of #793 |
Version 2.8.0 of the json-schema gem assumed the WIP draft 6 URI would be "http://json-schema.org/draft-06/schema#". It happens that it is in fact "http://json-schema.org/draft/schema#".
This was fixed in: voxpupuli/json-schema#376
json-schema PATCH vesion was bumped, so that version 2.8.1 include this fix.
Instead of depending on a buggy version of this gem and using the same wrong URI, switch to the fixed version of the gem and use the expected URI.