-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: returning a validation error in case of wrong configuration. #157
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #157 +/- ##
==========================================
- Coverage 28.72% 28.67% -0.05%
==========================================
Files 106 106
Lines 15888 15915 +27
==========================================
Hits 4564 4564
- Misses 10842 10869 +27
Partials 482 482 ☔ View full report in Codecov by Sentry. |
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.
Looks good. Just 1 minor nit.
Can we also add the changelog entry with this PR?
As of now, while using deck to create a route-scoped plugin with a `service` field defined, the sync goes through the first time but errors out subsequently. Under a route, we do not want the user to add the `service` field for a plugin. Thus, we are checking for this specific scenario and erroring out, instead of letting the sync action go through. For: Kong/deck#1353
A foreign key nested under a plugin of a different scope would error out. This would make sure that a sync does not go through when wrong configurations are passed via deck. An example would be adding a `service` field in a plugin, nested under a route. This change ensures more such issues do not come up.
42059b2
to
c2be37c
Compare
Thank you! |
Sorry. I get these mixed up as those repos have different approaches to handling changelog. 👍 |
As of now, while using deck to create a
route-scoped plugin with a
service
fielddefined, the sync goes through the first
time but errors out subsequently. Under a
route, we do not want the user to add the
service
field for a plugin. Thus, we arechecking for this specific scenario and
erroring out, instead of letting the sync
action go through.
For: Kong/deck#1353
Documentation
Testing