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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #1353 ignore evaluation of $schema field in json-schema #1354

Merged
merged 1 commit into from Dec 26, 2018

Conversation

Eomm
Copy link
Member

@Eomm Eomm commented Dec 25, 2018

Hi,
this is the fix for #1353 issue, where $schema field is ignored and it is not resolved.
I checked that there aren't other fields like that, and I didn't notice them.

I have run also benchmark (with some problems 馃槄), but looking the code I think that this change impact only the startup time right?
Do you need this fix starting from branch 1.x also?

Thank you

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

Running banchmarks I get these error after some succesfull run, but maybe could be caused by PC?

{"level":50,"time":1545772614031,"msg":"client error","pid":14584,"hostname":"EOMM-XPS","err":{"type":"Error","message":"write ECANCELED","stack":"Error: write ECANCELED\n    at _errnoException (util.js:992:11)\n    at WriteWrap.afterWrite [as oncomplete] (net.js:864:14)","code":"ECANCELED","errno":"ECANCELED","syscall":"write"},"v":1}

@cemremengu
Copy link
Contributor

cemremengu commented Dec 25, 2018

Thanks for the PR! Yes, the schemas are precompiled for efficiency (fastify's secret sauce) and we will need to backport this for 1.x as well

@cemremengu cemremengu added bugfix Issue or PR that should land as semver patch backport 1.x Issue or pr that should be backported to Fastify v1 labels Dec 25, 2018
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@cemremengu cemremengu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@delvedor delvedor merged commit 9f9c88f into fastify:master Dec 26, 2018
@delvedor
Copy link
Member

Backported to 1.x in 0ee57e7.

@Eomm
Copy link
Member Author

Eomm commented Dec 26, 2018

Thank you guys 馃槂

@Eomm Eomm deleted the fix/json-schema-field branch December 26, 2018 13:12
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport 1.x Issue or pr that should be backported to Fastify v1 bugfix Issue or PR that should land as semver patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants