yangwwei commented on a change in pull request #213:
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/213#discussion_r547509433
##########
File path: pkg/cache/application_events.go
##########
@@ -160,3 +162,34 @@ func (fe FailApplicationEvent) GetArgs() []interface{} {
func (fe FailApplicationEvent) GetApplicationID() string {
return fe.applicationID
}
+
+// ------------------------
+// Release application
+// ------------------------
+type ReleaseApplicationEvent struct {
+ applicationID string
+ allocationUUID string
+ event events.ApplicationEventType
+}
Review comment:
can you pls add the TERMINATION_TYPE in this message as well?
this gives us the flexibility in case we want to handle different types
differently in the future
##########
File path: pkg/cache/application_events.go
##########
@@ -160,3 +162,34 @@ func (fe FailApplicationEvent) GetArgs() []interface{} {
func (fe FailApplicationEvent) GetApplicationID() string {
return fe.applicationID
}
+
+// ------------------------
+// Release application
Review comment:
NIT: Release application allocations
##########
File path: pkg/cache/context.go
##########
@@ -552,6 +552,16 @@ func (ctx *Context) RemoveApplication(appID string) error {
}
}
+func (ctx *Context) RemoveApplicationInternal(appID string) error {
Review comment:
can you add a UT to cover this function?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]