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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set upper bound on jsonschema dep #1817

Closed
drewbanin opened this issue Oct 9, 2019 · 4 comments · Fixed by #1821
Closed

Set upper bound on jsonschema dep #1817

drewbanin opened this issue Oct 9, 2019 · 4 comments · Fixed by #1821
Labels
bug Something isn't working

Comments

@drewbanin
Copy link
Contributor

Describe the bug

With jsonschema==3.1.0 installed, users see the error:

\Z is not valid in Javascript regular expressions - use $ instead (pattern='^[^[0-9][^A-Za-z]][A-Za-z]*\\Z')

This error comes from this line of code:
https://github.com/fishtown-analytics/dbt/blob/dev/0.14.1/core/dbt/contracts/project.py#L43

It appears that jsonschema v3.1.0 does not support the \Z regex token, whereas version 3.0.2 did.

We should either update dbt to be compatible with the 3.1.0 release, or we should pin this dependency to a specific version (like 3.0.2).

@drewbanin drewbanin added the bug Something isn't working label Oct 9, 2019
@drewbanin drewbanin added this to the 0.14.3 milestone Oct 9, 2019
@drewbanin
Copy link
Contributor Author

I'm adding this to the 0.14.3 release because new installs of dbt are currently bricked.

@drewbanin
Copy link
Contributor Author

If you encounter this error, you can fix it by running

pip install jsonschema==3.0.2

@drewbanin
Copy link
Contributor Author

The root issue here was resolved in jsonschema==3.1.1.

Kicking this out of the 0.14.3 milestone and into Louisa May Alcott for a more in-depth triage in the future.

@drewbanin drewbanin modified the milestones: 0.14.3, Louisa May Alcott Oct 10, 2019
@beckjake
Copy link
Contributor

beckjake commented Oct 10, 2019

I think we should fix this three ways:

  1. Pin 0.14.3 to jsonschema==3.1.1, as it appears 3.1.2 will break this again (per this comment) and I don't really want to fix the regex at the last minute in a patch release.
  2. Pin the version that hologram pulls in to something reasonable (<3.2?) and cut a 0.0.4 release there.
  3. Fix our regex to be valid in JS in louisa-may-alcott. The library is technically doing the correct thing, though I do wish the author would have cut this as 4.x since it's a pretty-darn-breaking change. I guess the author only does major revisions for jsonschema draft updates, which is a bummer, but it means we should be pinning to minor releases, not major. That's easy enough to plan around, at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants