-
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
Strip down namespace object and clean up APIs #898
Conversation
Codecov Report
@@ Coverage Diff @@
## main #898 +/- ##
=======================================
Coverage 99.97% 99.98%
=======================================
Files 298 297 -1
Lines 19473 19400 -73
=======================================
- Hits 19469 19397 -72
+ Misses 4 3 -1
|
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Although it's stored on the namespace object, this is more appropriate as a piece of the namespace status (next to the list of plugins, etc). Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Keep it separate from the user-configured values. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Namespaces will no longer store an ID, type, or message ID in the database. They will no longer emit SPI events. The /status API will also return all namespace details as an object, instead of just returning a name. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
6471067
to
f6a07a8
Compare
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>
9ce561c
to
0d2a461
Compare
// NodeStatusPlugin field descriptions | ||
NodeStatusPluginName = ffm("NodeStatusPlugin.name", "The name of the plugin") | ||
NodeStatusPluginType = ffm("NodeStatusPlugin.pluginType", "The type of the plugin") | ||
NamespaceID = ffm("Namespace.id", "The UUID of the namespace. For locally established namespaces will be different on each node in the network. For broadcast namespaces, will be the same on every node") |
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.
Do we need to change these descriptions to get rid of the broadcast
terminology?
case stored != nil: | ||
stored.RemoteName = ns.remoteName | ||
stored.Description = ns.description | ||
// TODO: should we check for discrepancies in the multiparty contract config? |
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 do this and return an error? At a minimum, maybe we add a log statement that we're overwriting a stored config that has differences.
PluginType string `ffstruct:"NamespaceStatusPlugin" json:"pluginType"` | ||
} | ||
|
||
type NamespaceStatusMultiparty struct { |
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.
Does this struct need a comment since it's exported?
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.
Love seeing all the deleted code, just a few questions for consideration.
Merging this, made a task on the board to revisit these comments before release. |
Part of FIR-12
In a chain with #895Remove all remaining functionality related to broadcasting namespaces. It was already broken from previous commits, but this is now to confirm:
Clean up the
/namespaces/{ns}
and/namespaces/{ns}/status
APIs to be a little more organized.Clean up all namespace database operations to happen from Namespace Manager. Pass a pointer to the namespace object to any other managers that need it.