-
Notifications
You must be signed in to change notification settings - Fork 87
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
APPSRE-5046 generated types for service_dependencies #2495
APPSRE-5046 generated types for service_dependencies #2495
Conversation
3aa806c
to
a290f1b
Compare
61e9919
to
ae67231
Compare
@geoberle brought up an interesting idea on slack: generating a convenience function to load the query string. def load_query_string() -> str:
with open('path_to_file.gql', r) as f:
return f.read() That way we dont have to mess around with the file paths. I will add this to the generator now. |
Convenience function to load query strings added here: app-sre/qenerate#21 I.e., @geoberle 's idea is implemented now |
7029dc6
to
d648f86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
d648f86
to
32a16cd
Compare
|
||
from reconcile.utils import gql | ||
from reconcile import queries | ||
from reconcile.utils.external_resources import ( | ||
get_provision_providers, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_provision_providers
seems to not be used anywhere anymore (except in a test file), can we remove it and clean the code further ?
We want to introduce
saas_file_v2
inservice_dependencies
checks.introspection.json
of our schema. That json is required in order to infer types. The json is generated by the code generator viamake gql-introspection
. Note, that at a later step we might decide to package the introspection schema in a different place/repo. This is the first iteration..gql
file.make gql-query-classes
.From now on, any schema change will also require:
If the schema is not compatible in any way, we will see errors during type checking phase.
A check that the
introspection.json
and generated classes are up-to-date with the latest schema should be part of CI in later step.This will be merged after we merged our design doc for the code generator.Design doc is merged.This PR gives a very practical insight on how type generation will look on an existing integration.
A follow-up PR will then introduce
saas_file_v2
to the query.