Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Schema validation - disable for now #92

Closed
kptdobe opened this issue Nov 6, 2018 · 5 comments · Fixed by #391
Closed

Schema validation - disable for now #92

kptdobe opened this issue Nov 6, 2018 · 5 comments · Fixed by #391
Labels
bug Something isn't working released

Comments

@kptdobe
Copy link
Contributor

kptdobe commented Nov 6, 2018

The schema validation is a really annoying feature : for every single new non-handled case, the rendering the broken.

New one:

[hlx] warn: tapping failed: Error: Invalid Context at step 2
data.content.mdast.children[9].meta should be string undefined, data.content.mdast.children[11].meta should be string undefined, data.content.mdast.children[13].meta should be string undefined, data.content.mdast.children[15].meta should be string undefined

Multiple issues:

  1. The logs are warn while the validation blocks the rendering. They should be error.
  2. Appart from adding a break point at the right place in the pipeline (for the record, this line https://github.com/adobe/hypermedia-pipeline/blob/master/src/utils/validate.js#L46), impossible to know what is wrong
  3. To unblock the rendering, you need to patch the current hlx version

My proposal here is to keep the messages as warnings and to disable the "blocking" aspect of the validation.

cc @trieloff

@kptdobe kptdobe added the bug Something isn't working label Nov 6, 2018
@kptdobe
Copy link
Contributor Author

kptdobe commented Nov 6, 2018

Workaround for 2.: inspect logs/debug/context_dump_* files.

But this does not reduce the annoyance of the non rendering of the request.

@trieloff
Copy link
Contributor

trieloff commented Nov 8, 2018

I know that it is annoying, but I think it is the fastest way of getting the schemas in sync with reality.

@trieloff
Copy link
Contributor

We are pretty close now, so I'd close this.

@ramboz
Copy link
Contributor

ramboz commented Jun 22, 2019

@trieloff The every step for the validation will still trigger for each error step as well, so the error message is repeated several times with no added benefit.

I'm reopening and proposing a quick fix for that

@ramboz ramboz reopened this Jun 22, 2019
ramboz added a commit to adobe/helix-cli that referenced this issue Aug 2, 2019
ramboz added a commit that referenced this issue Sep 13, 2019
ramboz added a commit that referenced this issue Sep 13, 2019
Only report the schema validation error once in the pipeline instead of for every step

fix #92
adobe-bot pushed a commit that referenced this issue Sep 13, 2019
## [5.5.1](v5.5.0...v5.5.1) (2019-09-13)

### Bug Fixes

* **all pipe:** reduce schema validation error reporting ([#391](#391)) ([c9e75f5](c9e75f5)), closes [#92](#92)
@adobe-bot
Copy link

🎉 This issue has been resolved in version 5.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working released
Projects
None yet
4 participants