-
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
E2E suite cleanup #904
E2E suite cleanup #904
Conversation
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>
Eventually this could evolve into a proper Go client SDK. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Codecov Report
@@ Coverage Diff @@
## main #904 +/- ##
==========================================
+ Coverage 99.96% 99.97% +0.01%
==========================================
Files 298 298
Lines 19563 19572 +9
==========================================
+ Hits 19557 19568 +11
+ Misses 5 4 -1
+ Partials 1 0 -1
Continue to review full report at Codecov.
|
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
There is now a general-purpose identityCache for all identities, which takes the namespace into account (particularly important when resolving V1 identities between the current namespace and ff_system). Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
@@ -36,7 +36,7 @@ type Plugin interface { | |||
Init(ctx context.Context, config config.Section, metrics metrics.Manager) error | |||
|
|||
// SetHandler registers a handler to receive callbacks | |||
// If namespace is set, plugin will attempt to deliver only events for that namespace | |||
// Plugin will attempt (but is not guaranteed) to deliver events only for the given namespace |
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 mean that it might accidentally deliver events for a different namespace?
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.
In 1.1
, ethconnect/fabconnect subscriptions will be in the format ff-sub-<namespace>-<listener ID>
. The plugins will attempt to parse the namespace
from the subscription name and then deliver to the correct handler. If not, it will deliver to all plugins.
One scenario where this is likely is existing subscriptions after upgrading to 1.1
.
You can see #891 if you're interested.
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.
@nguyer In short, yes. The managers that register callbacks must therefore always check each event and discard any that are not relevant to them.
Originally there was no filtering at the plugin level (each plugin would deliver all events it received to every subscribed manager). We added namespace-level filtering as a best effort to make things more performant, but as @shorsher mentioned there are situations where it just isn't tenable at the plugin level.
Factor out a struct for FireFlyClient (bringing it closer to being exportable as an actual client SDK).
Reorganize and clean up various pieces between
run.sh
and the suite itself (preferring to keeprun.sh
as thin as possible).