-
Notifications
You must be signed in to change notification settings - Fork 150
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
feat!: Type definition specification with env vars and JSON files #399
Conversation
BREAKING CHANGE remove /config/types.json; Replaced with SAS_SUBSTRATE_TYPES.
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.
This seems to get the job done.
Do you think it'd be good long term to switch to using a proper config file, rather than using env variables? So we'd have substrate-api-sidecar --config=my-config.[json|toml|yaml]
and have all the type overrides and other configuration as keys in there?
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. I like how it gives the end user more flexibility.
@dvdplm Right now the equivalent would be putting all your env vars in a |
I do have a distaste for ENV vars, but my opinion on this is definitely a minority. My gut reaction to But yeah, ENV vars are really popular with many smart people so I tend to keep my opinions to myself. They're good from the devops POV for sure, and has good tooling on that end. When I wrote my first comment what I had in mind was the ability to merge configs from several places: a decent set of defaults from substrate, refined further from polkadot and finally overrideable by users for their own chains. Such a hierarchy of config values is tractable using config files in a sane format; with ENV vars not so much? |
I really have minimal opinion on this, just what ever works for the most people. Happy to explore/implement different solutions in the future - I just would need a clear direction |
closes: #387
changes
BREAKING CHANGE remove /config/types.json; Functionality replaced with SAS_SUBSTRATE_TYPES.
Additionally the following environment variables are added:
motivation
This will allow users to update chain types when there is a delay for type updates in the apps-config package supply chain or if a chain's type definitions simply do not exist in the apps-config.