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

Allow nested dictionary to be optional in addon config #4607

Closed
wants to merge 3 commits into from

Conversation

raman325
Copy link
Contributor

@raman325 raman325 commented Oct 6, 2023

Proposed change

See this issue for more details on the behavior I am trying to enable along with an example: #4606

I believe that if a nested dictionary is in the schema but not in the options and therefore hidden by default from the configuration UI, it should be optional, and I consider this a bug because you can hide it.

I know I need to refactor tests significantly for this change, but I wanted to get a sense of whether I am headed in the right direction before I continue.

I also attempted to improve the error message because I noticed that the key that failed validation is not always part of the message which makes it confusing.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints of add-on configuration are added/changed:

@pvizeli
Copy link
Member

pvizeli commented Oct 10, 2023

We should implement: #2640

@raman325 raman325 closed this Oct 13, 2023
@raman325 raman325 deleted the addon branch October 13, 2023 15:10
@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hidden nested dictionary in addon configuration causes validation to fail if dictionary isn't populated
2 participants