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

feat(data-schema): Add validation for settings #397

Closed
wants to merge 6 commits into from
Closed

feat(data-schema): Add validation for settings #397

wants to merge 6 commits into from

Conversation

supra08
Copy link
Contributor

@supra08 supra08 commented May 20, 2020

Context

Fixes screwdriver-cd/screwdriver#1574

Objective

This PR adds validation for settings in the shared section. Currently the settings has 2 keys email and slack. These can have multiple values like arrays of strings of objects. So this is being validated now. Apart from this, a regex for status has been added for status validation.

References

screwdriver-cd/screwdriver#1574

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@supra08
Copy link
Contributor Author

supra08 commented May 20, 2020

@jithine please review

Copy link
Member

@jithine jithine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the guiding principles with modular structure for Screwdriver was we leave it to specific libraries for handling logic & validation.

For settings example we should leave validation logic to https://github.com/screwdriver-cd/notifications-slack/

Since these schema is specific for individual plugins, I think it makes more sense to move it under specific libraries. And during validation phase, parser should have a generic way to call individual plugins

@tkyi
Copy link
Member

tkyi commented Dec 7, 2020

@tkyi tkyi closed this Dec 7, 2020
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.

Validator does not validate invalid settings
4 participants