-
Notifications
You must be signed in to change notification settings - Fork 15
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: Unmanage app on agent on deletion event #301
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: jannfis <[email protected]>
Signed-off-by: jannfis <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #301 +/- ##
==========================================
+ Coverage 48.79% 49.65% +0.85%
==========================================
Files 73 73
Lines 6400 6404 +4
==========================================
+ Hits 3123 3180 +57
+ Misses 3017 2959 -58
- Partials 260 265 +5 ☔ View full report in Codecov by Sentry. |
Signed-off-by: jannfis <[email protected]>
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.
LGTM
@@ -97,7 +97,9 @@ func (a *Agent) addAppDeletionToQueue(app *v1alpha1.Application) { | |||
logCtx.Debugf("Delete app event") | |||
|
|||
if !a.appManager.IsManaged(app.QualifiedName()) { | |||
logCtx.Tracef("App is not managed") | |||
logCtx.Tracef("App is not managed, proceeding anyways") |
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.
nitpick: logCtx.Trace
can be used as there are no format specifiers.
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.
LGTM
What does this PR do / why we need it:
When an app is deleted on the agent, it was not unmanaged. That prevented the agent from creating a new app with the same name again.
In addition, this PR adds unit tests for the agent's informer callbacks.
Which issue(s) this PR fixes:
Fixes #?
How to test changes / Special notes to the reviewer:
Checklist