Explorar o código

Add failure mode for OOM (#3959)

Feroze Mohideen %!s(int64=2) %!d(string=hai) anos
pai
achega
2e74abcb63
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      internal/porter_app/notifications/porter_error/codes.go

+ 4 - 0
internal/porter_app/notifications/porter_error/codes.go

@@ -81,6 +81,10 @@ func ErrorCode(agentSummary, agentDetail string) PorterErrorCode {
 		return PorterErrorCode_MemoryLimitExceeded
 		return PorterErrorCode_MemoryLimitExceeded
 	}
 	}
 
 
+	if strings.Contains(agentSummary, "requested more memory than is available") {
+		return PorterErrorCode_MemoryLimitExceeded
+	}
+
 	if strings.Contains(agentSummary, "requesting too much memory and cannot scale up") {
 	if strings.Contains(agentSummary, "requesting too much memory and cannot scale up") {
 		return PorterErrorCode_MemoryLimitExceeded_ScaleUp
 		return PorterErrorCode_MemoryLimitExceeded_ScaleUp
 	}
 	}