-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
add a command line argument to validate the config and exit #1303
Conversation
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the WalkthroughThis update introduces a new feature allowing users to validate their configuration files using a Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1303 +/- ##
================================================
- Coverage 54.1528% 54.0812% -0.0716%
================================================
Files 157 157
Lines 24634 24674 +40
Branches 1442 1443 +1
================================================
+ Hits 13340 13344 +4
- Misses 11238 11274 +36
Partials 56 56 ☔ View full report in Codecov by Sentry. |
This comment was marked as outdated.
This comment was marked as outdated.
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (1)
- server/app.ts (1 hunks)
Additional comments: 1
server/app.ts (1)
- 57-65: Ensure that the rest of the application's initialization and shutdown processes are unaffected by the early exit introduced by the
--validate
flag. This includes verifying that no necessary cleanup or initialization steps are skipped that could lead to resource leaks or other issues when the application is used in normal operation mode.
For clarification, what changes do you want with As is |
Think about the use case. I want to avoid deploying configs that break functionality. Email is critical for letting users reset their passwords. Failing to have that properly configured so that it works (when it is desired by the deployer) is bad. |
When using |
Make sure you are checking the |
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.
Looking good, but could be better.
I think this is way better. I tested it and it looks good. The only problem I'm seeing is with repeat error messages for the mail config. It's because of this in Also, the name for
|
I don't know if it's better to make |
05c85e8
to
390983d
Compare
Passing run #1005 ↗︎Details:
Review all test suite changes for PR #1303 ↗︎ |
* attempt at adding --validate flag * changed conf.validate level * changed back level on validate * moved conf.validate to try catch * only load config once * also take into account validating mail * remove unused import * fix lint * make validateMail return result * fix lint * actually check result * make validateMail read only * add validateConf() * change validateConfig() * made requested changes * remove unused func * log correct error messages and correctly force sandbox mode * fix lint * validate before config is used for anything * move process exit calls to app.ts * changed return value of validateconfig to result * add logs --------- Co-authored-by: Carson McManus <[email protected]>
closes #1297