-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix(server): use a new db worker for hot updates #2581
Conversation
I think we should add
|
pkg/db/db.go
Outdated
func (c *Client) populateOCIArtifact() error { | ||
if c.artifact == nil { | ||
func (c *Client) populateOCIArtifact(force bool) error { | ||
if c.artifact == nil || force { |
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 found force
is always true... Can we simply populate it anytime by removing the if-statement?
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 found
force
is always true... Can we simply populate it anytime by removing the if-statement?
yes, I wanted to write the same 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.
We should test it carefully, image scanning, client/server mode, Kubernetes scanning, etc. I don't remember, but there was a reason to avoid multiple initializations. It may be no longer necessary after some refactoring though.
Description
the first updating uses a new client instance, but
hotUpdate
uses the same client instance for all attempts.we should use a new client for each update, because the client doesn't populate a new artifact.
Related issues
Checklist