-
Notifications
You must be signed in to change notification settings - Fork 5k
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: make sure api server informer does not stop after setting change #9842
Conversation
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
58fe744
to
8d732d3
Compare
@@ -160,6 +160,7 @@ func NewCommand() *cobra.Command { | |||
stats.StartStatsTicker(10 * time.Minute) | |||
stats.RegisterHeapDumper("memprofile") | |||
argocd := server.NewServer(context.Background(), argoCDOpts) | |||
argocd.Init(context.Background()) |
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.
This is not really your problem, but just noticed we call context.Background()
three times in same function and you might consider consolidating to one ctx.
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.
This problem is fairly pervasive throughout cmd/
.
I may look at this a little bit since it's an easy opportunity to get to know the codebase more.
Codecov Report
@@ Coverage Diff @@
## master #9842 +/- ##
=======================================
Coverage 45.86% 45.86%
=======================================
Files 227 227
Lines 26862 26862
=======================================
Hits 12320 12320
Misses 12862 12862
Partials 1680 1680
Continue to review full report at Codecov.
|
…#9842) Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Alexander Matyushentsev AMatyushentsev@gmail.com
PR fixes the bug introduced by #9778. After changing any SSO-related setting the API server returns a stale list of applications/projects. The issue is happening because API server attempts to restart application/app project informers which is not supported. Informer just stops and quietly refuses to start.