-
Notifications
You must be signed in to change notification settings - Fork 24
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(validation): validation fails if component has source_config #337
base: main
Are you sure you want to change the base?
feat(validation): validation fails if component has source_config #337
Conversation
… definition Signed-off-by: Márk Kővári <kovarimarkofficial@gmail.com>
I do have 2 questions tho:
Appreciate |
Signed-off-by: Márk Kővári <kovarimarkofficial@gmail.com>
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.
Hey @markkovari ! I think the structure of this PR looks great, you may just need to consider a change or two after #307. If we want to try and move this forward now, we should at least just change the parsing of the source_config key to be in a link trait
traits: | ||
- type: spreadscaler | ||
properties: | ||
instances: 1 | ||
# This is not allowed since 1.0.0 should error during validation | ||
source_config: | ||
- name: any_value | ||
properties: | ||
SOME_OTHER_KEY: any_other_value |
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.
This trait should be a link trait, just because that's where the source_config value lives
if let TraitProperty::Custom(custom) = trait_.properties.clone() { | ||
if let Some(_) = custom.get(forbidden_config_key) { |
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.
So just a heads up, you may have to do some reworking of this after https://github.com/wasmCloud/wadm/pull/307/files merges because the trait properties with source_config
should actually parse as a link trait.
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.
Cool, thanks for the heads up, we can definitely wait a bit with this than, I was just getting familiar with the project. 🙇
Feature or Problem
Related Issues
#288
Release Information
Consumer Impact
Testing
Unit Test(s)
unit tests should cover the negative case, other validation calls don't have this error
Acceptance or Integration
Manual Verification