Skip to content
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

More config checks #4310

Merged
merged 6 commits into from
Nov 9, 2022
Merged

Conversation

NickM-27
Copy link
Sponsor Collaborator

@NickM-27 NickM-27 commented Nov 7, 2022

Add config checks:

  • Ensure user doesn't have objects in zone -> objects that are not tracked
  • Ensure user does not override a field by defining it multiple times

@netlify
Copy link

netlify bot commented Nov 7, 2022

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit bfdeedc
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/636aeb55dedcde00085ea8f0

@blakeblackshear
Copy link
Owner

Does any of this translate when setting the schema validation in vs code when editing a yaml file? I'm guessing not. Maybe that's not possible. Mostly curious as we plan for an embedded config editor.

@NickM-27
Copy link
Sponsor Collaborator Author

NickM-27 commented Nov 9, 2022

Does any of this translate when setting the schema validation in vs code when editing a yaml file? I'm guessing not. Maybe that's not possible. Mostly curious as we plan for an embedded config editor.

From what I can tell I don't think so unfortunately, doesn't seem there is a way to set errors in there: https://pydantic-docs.helpmanual.io/usage/schema/#schema-customization

@blakeblackshear
Copy link
Owner

O well. We will just have to do what we can client side and have a validate endpoint for the rest.

@blakeblackshear blakeblackshear merged commit 9e31873 into blakeblackshear:dev Nov 9, 2022
@NickM-27 NickM-27 deleted the more-config-checks branch November 9, 2022 01:49
herostrat pushed a commit to herostrat/frigate that referenced this pull request Nov 24, 2022
* Move existing checks to own functions

* Add config check for zone objects that are not tracked

* Add tests for config error

* Formatting

* Catch case where field is defined multiple times and add test

* Add warning for rtmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants