-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[CT-1944] [SPIKE] Remove dependency on hologram
#6776
Comments
hologram
hologram
Actually right now it's not out of scope :) It was out of scope back in 2021 because there were a bunch of other problems in the first place. I'm working on adding |
Relevant conversation, proposing a few more alternatives: |
hologram
hologram
FWIW: the dependent version of hologram is now making dbt-core incompatible with Airflow >=2.5.2... Airflow now requires jsonschema>=4.0.0, which is incompatible with hologram>0.0.14,<0.0.15 Effectively, we are unable to upgrade airflow due to this dependency. I know our problems really aren't your problems, but if this is can be upgraded that would be excellent :) |
Hi, folks! As I promised, JSON Schema generation is now out of the box in mashumaro. Would you like to give it a try? If some functionality you need is missing, then I'm ready to work on it. |
Seconding @codecae's sentiment above, this dependency is also making dbt-core incompatible with |
Hi folks! Looks like migrating solely to mashumaro isn't possible currently because mashumaro only performs JSON Schema generation, not JSON Schema validation. The available options are either:
Both of these approaches are outside the scope of this spike, so I'm going to stop investigating for now. |
@gshank Should we close this spike and open a separate issue for follow up? |
Closing this for now, will continue work in #8426. |
We started
hologram
a fork ofdataclasses-jsonschema
. It allowed us to adopt Python dataclasses in Python 3.7+, while still making use of JSONSchema-based validation. We haven't done a particularly good job of maintaining it in the years since, and it now brings us more grief than good.We use
hologram
in two places today:dataclass_schema.py
), although the validation errors it raises are really unpleasant & not very helpfulI recently ran into the unpleasantness of the validation error message, while trying to find the root cause of fivetran/dbt_amazon_ads_source#6. Nowhere did this error tell me that this was in the
config.enabled
of a source, nor even the file where the source was defined!Requirements
Copying from older Jira ticket:
Since writing that Jira ticket, we have introduced proto definitions for our event system, and are working (slowly but surely) to extend that framework to our core classes (#6391).
The other serialization/validation library we use,
mashumaro
, considers native support for schema generation out of scope:The text was updated successfully, but these errors were encountered: