-
-
Notifications
You must be signed in to change notification settings - Fork 57
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(MDC): Validate configs in CI #3128
Conversation
Codecov ReportBase: 92.81% // Head: 92.72% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3128 +/- ##
==========================================
- Coverage 92.81% 92.72% -0.10%
==========================================
Files 677 678 +1
Lines 30933 30961 +28
==========================================
- Hits 28712 28709 -3
- Misses 2221 2252 +31
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Nice, this looks good! The only thing I would change is to move the validation script into the snuba
app, so we can do snuba validate-configs
.
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.
The print
statements can probably be converted to click.echo
to follow convention.
Something I noticed when running snuba validate-configs
, the snuba
CLI-command by default imports all modules within /cli
, which includes the subscriptions-executor command
. This command runs get_enabled_dataset_names()
in a command-line argument (
snuba/snuba/cli/subscriptions_executor.py
Line 27 in 2d5817d
type=click.Choice(get_enabled_dataset_names()), |
load_configuration_data()
.
Therefore, when a user has an invalid config, and they run snuba validate-configs
, the validation occurs in the loading of the subscriptions-executor
module as opposed to snuba validate-configs
itself.
Overview
.yaml
files located under the config files directory