-
Notifications
You must be signed in to change notification settings - Fork 209
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
Use a separate orchestrator for each namespace #855
Conversation
Update namespace manager to contain an orchestrator per namespace. Now, namespace manager will validate & get all plugins, validate all namespaces defined in configuration, and instantiate an orchestrator for each namespace. Orchestrator now receives the defined plugins for that orchestrator's namespace and instantiates the managers. This is a first pass - some items are still broken and need further work. Signed-off-by: Alex Shorsher <alex.shorsher@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Some of these may come back in a different form, but they need to be removed for the moment because they exist outside of the namespaced orchestrators. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Temporarily disable many of the tests that are no longer relevant. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Most of the orchestrator and namespace manager tests are disabled, but the rest of the tests now pass. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Move this out of /status (since it's just a collection query), and put it under namespaces like most of the other routes. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Avoid setting these twice. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Now under /namespaces. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Remove the "/status" prefix, since this is a global route and no longer grouped with the other "status" routes. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Returns very basic information about all available namespaces. Note that there is no "GetNamespaces" query on orchestrator or the database layer now, as these details may be spread across multiple databases. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Only the "get many" route for operations is broken now. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Codecov Report
@@ Coverage Diff @@
## main #855 +/- ##
==========================================
- Coverage 99.98% 99.96% -0.03%
==========================================
Files 299 300 +1
Lines 19523 19510 -13
==========================================
- Hits 19521 19504 -17
- Misses 1 5 +4
Partials 1 1
Continue to review full report at Codecov.
|
Each listener will ignore events outside its namespace. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Each listener will ignore events outside its namespace. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Each listener will ignore events outside its namespace. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
metricsEnabled bool | ||
metrics metrics.Manager | ||
adminEvents spievents.Manager | ||
utOrchestrator orchestrator.Orchestrator |
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.
I don't love this testing workaround, but I was struggling to find a better way.
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
@@ -37,6 +37,7 @@ var spiGetOps = &ffapi.Route{ | |||
Extensions: &coreExtensions{ | |||
FilterFactory: database.OperationQueryFactory, | |||
CoreJSONHandler: func(r *ffapi.APIRequest, cr *coreRequest) (output interface{}, err error) { | |||
// TODO: cr.or will be nil (this must be converted to a namespaced query) |
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.
Should we not do this in this PR? Having a broken endpoint seems bad, and it should be fine to make it namespaces/{ns}/operations
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.
(We still need the operations/{nsopid}
routes for GET
and PATCH
, where the namespace is embedded into the ID)
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.
Yep that works - I can replace that route. Just wanted to get your feedback on how to spell it in the context of the other SPI routes and the usage by FFTM.
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.
Thanks for calling out all the considerations for where we end up after this (big!) step forwards. Looks good. I did have a couple of very minor comments along the way to review before merge.
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Changed in this PR:
Broken in this PR:
/operations
to/namespaces/{ns}/operations
, which represents a breaking change against FFTM.Also includes the changes from #856.