Comments (6)
Hi, I have test with 0.8.2 and there is no crash
from check-jsonschema.
The check-github-workflows
hook fetches the latest schema from https://json.schemastore.org/github-workflow
.
It will always attempt to fetch in case the schema has been updated.
The "Temporary failure in name resolution" points at DNS, suggesting that json.schemastore.org
wasn't resolving for you.
So I have two questions for you:
- Are you using the hook in an environment where the network was unavailable or restricted? e.g. laptop disconnected from wifi, running within a company intranet, etc
- Does the failure persist, or did it fail once and is working now?
And a workaround:
- If you download the schema from the link above, you can refer to the local path to your schema with
--schemafile
. The readme documents how to "reimplement" the github workflows hook in this way.
If you commit the schemastore schema to your repo, I believe it would be appropriate to put it in a directory with a copy of the schemastore license.
If that workaround is satisfying for you, I could document it in the readme.
from check-jsonschema.
Thanks for the fast response.
Concerning your questions, I'm using https://pre-commit.ci/
so I don't know if the have some restrictions but it could be the case.
from check-jsonschema.
I looked into the pre-commit.ci issue tracker a bit, and it seems that the system disallows use of the network at runtime. That's reasonable, but it also poses a problem for how I designed check-jsonschema
.
I think the best possible solution is for check-jsonschema
to bundle versions of the various schemas for supported hooks, and then to use those as a failover in the event that downloads from schemastore fail.
I'll need to script out vendorizing these schemas, so that I can easily pull in updates to keep the bundled versions fresh.
(I did consider having it pull in the schema at install time, but that's a lot trickier than having a vendored copy included.)
I also want to look into adding some retries for the download step and better logging if it fails and we don't have a failover schema to use, but that can be done later.
from check-jsonschema.
Indeed it makes sense to disallows the use of network at runtime.
The failover would be a very nice feature.
from check-jsonschema.
I've just released version 0.8.0, which adds in builtin schemas, including vendorized copies of the ones for the default hooks, and a behavior to failover to these schemas when downloading fails.
I believe this is sufficient to resolve this issue, so I've closed. But if someone could confirm that the fix works, that would be awesome! Please reopen if 0.8.0 isn't solving this.
from check-jsonschema.
Related Issues (20)
- Support ECMAScript unicode-mode RegExp usage for 'pattern' and 'patternProperties' HOT 3
- [BUG] `github-workflows-require-timeout.json`: `timeout-minutes` should allow expressions HOT 4
- Feature request: add line numbers to the output HOT 3
- Update vendored bitbucket schema HOT 1
- Feature request: add file names to the ouptut even if validation is OK HOT 3
- "unexpected keyword argument 'registry'" when validating specific GitHub workflow HOT 4
- Bug: Globs work in my machine but fails on CI HOT 3
- AttributeError not parsing schema correctly. HOT 2
- Cannot validate date-time via the CLI tool HOT 4
- Distribute the check-jsonschema tool in a manner which does not assume a Python environment
- Validation passes for misspelled optional child properties in Google Cloud Build schema HOT 7
- check-gitlab-ci: coverage is not a regex HOT 9
- Check yaml with check-metaschema option HOT 3
- Non-JSON files ignored despite --default-type being set HOT 4
- check-azure-pipelines: doesn't handle default value for boolean parameter properly HOT 2
- --schemafile from $schema HOT 1
- Cannot download schema using check-jsonschema HOT 3
- `src/check_jsonschema/builtin_schemas/vendor` file organization HOT 2
- Addition of CircleCI hook? HOT 1
- Release schemas update? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from check-jsonschema.