-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[KS-616] asset job updates #15573
[KS-616] asset job updates #15573
Conversation
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
687b2fc
to
670c0b3
Compare
Flakeguard Summary
Found Flaky Tests ❌
|
Flakeguard Summary
Found Flaky Tests ❌
|
plugins/loop_registry.go
Outdated
@@ -45,14 +42,15 @@ func NewLoopRegistry(lggr logger.Logger, tracing config.Tracing, telemetry confi | |||
} | |||
} | |||
|
|||
// Register creates a port of the plugin. It is not idempotent. Duplicate calls to Register will return [ErrExists] | |||
// Register creates a port of the plugin. It is idempotent. Duplicate calls to Register will return the same port. |
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.
Any possible unintended consequences?
Also why would anybody call it more than once?
plugins/loop_registry.go
Outdated
if _, exists := m.registry[id]; exists { | ||
return nil, ErrExists | ||
if l, exists := m.registry[id]; exists { | ||
m.lggr.Warnf("Trying to register a loop that is already registered %q", 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.
Hmmmm -- is this all we need to do? I would have thought that there would now be multiple loopps running, one of which is orhpaned because I don't see us cleaning it up.
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 believe it was a little different.
we are passing the loop server backas one of the job ServiceCtx objects and that will be closed when the active job closes all it's subservices
rather, we are forgetting to unregister the loop as part of this job close'ing
i refactored to make a much more targeted fix that only applies to mercury and a follow up ticket to make the pattern reusable for other jobs.
note that the generic jobs are already unregisteringand this should only effect job that really on custom providers
// loopUnregisterCloser is a helper to unregister a loop | ||
// as a service | ||
// TODO BCF-3451 all other jobs that use custom plugin providers that should be refactored to use this pattern | ||
// perhaps it can be implemented in the delegate on job delete. |
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.
+1
KS-616
Error observed when updating job but not when creating.
Traced to duplicate registration in the Loop Registry.
This was then traced to missing Unregister when the Job closes all it's sub services.
Requires
Supports