question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Revamp Sparkler Config - Type checking + Validation + *-site.yaml overriding

See original GitHub issue

There are two FIXME: in configuration:

First, support loading sparkler-defaults.yaml and sparkler-site.yaml. The common practice is *-default.yaml provides default and recommended values from developers. The *-site.yaml should beused by users to customize or to override the defaults. Right now sparkler-default.yaml is supported and sparkler-site.yaml is not yet supported.

Second, towards the stability of system and fail early when errors are introduced by humans. Right now YAML configuration is transformed to JSON and internally it is treated as JSON. The system wouldn’t know ahead of time if config is invalid. There is no type check for values, no schema validation etc. This could introduce errors to system and crash in later stages when the input config is invalid. As you see, except the config module, the rest of system is in staticly typed and strictly enforced. I think it will be nice to fail early when the config is invalid.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
SHASHANK-PRO-05commented, Mar 3, 2017

@thammegowda @karanjeets Let me know if you find things that can be done better. https://github.com/SHASHANK-PRO-05/sparkler.git. I am doing development in “dev” branch. Also, I am creating reusable annotations in utils package. Do check that out also

0reactions
thammegowdacommented, Mar 3, 2017

@SHASHANK-PRO-05 Sounds good to me.

  1. Perfect! It’s a great solution for bean validation.
  2. 👍 for now.
  3. 👍
  4. Perfect
  5. Awesome. That’s very much needed.

I will be excited to see these changes coming! Send me a link to your repository and your branch, I will check them and provide early feedback as quickly as possible

CC @karanjeets Check this out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application config with YAML and JSON Schema validation
The user can override the default configuration by writting a YAML file. On top of that we added two additional requirements: The configuration...
Read more >
How to use YAML Schema to validate your YAML files
A schema defines the general structure to which files should adhere. A specific file can then be checked against that schema to verify...
Read more >
Validate Resources
A validation rule which checks resource data is defined as an overlay pattern that provides the desired configuration. Resource configurations ...
Read more >
Build Config Validation
Level Key Meaning Error invalid_condition The condition could not be parsed. Error invalid_env_var The env var could not be parsed. Error invalid_format The value has an...
Read more >
Google Cloud release notes | Documentation
Setting the check-image-version flag to 'latest' ensures that clusters are ... An update to Spanner change streams provides two new data capture types...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found