-
Notifications
You must be signed in to change notification settings - Fork 242
Handle namespace validation at the route level rather than at data manager #876
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
Conversation
Since the data manager is now instantiated inside a namespace, it's redundant to check if that namespace exists. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Since most routes now query an orchestrator from namespace manager, they should return 404 if an orchestrator can't be found (ie if namespace does not exist). Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Codecov Report
@@ Coverage Diff @@
## main #876 +/- ##
==========================================
+ Coverage 99.95% 99.97% +0.02%
==========================================
Files 300 300
Lines 19479 19457 -22
==========================================
- Hits 19470 19453 -17
+ Misses 7 4 -3
+ Partials 2 0 -2
Continue to review full report at Codecov.
|
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
shorsher
left a comment
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 to me, with a very minor style comment
🚀
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
peterbroadhurst
left a comment
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.
👍
Data manager is already part of a namespace, so determination of whether the namespace is valid needs to happen earlier in the router, when we're attempting to lookup the proper orchestrator to handle the request.