che #9946: Better handling of unrecoverable events for k8s & openshift infra (processing both 'container' and 'pod' events)#10155
Conversation
|
Can one of the admins verify this patch? |
1 similar comment
|
Can one of the admins verify this patch? |
|
@riuvshin Is it possible to include Ilya to the list of trusted github users for the CI? |
garagatyi
left a comment
There was a problem hiding this comment.
Looks good! An additional thank you for simplifying the code!
Can you add more details to the PR description since it is pretty hard to understand what was changed, why and why it wasn't done before? I see the reason and I have enough context to understand it fully but it might be a bit complex overall or when the context is lost.
Can you also exaplins why it is in the WIP state?
|
ci-test |
|
@garagatyi thanks for your comment. WIP is just because I want to test it a bit more. It appeared to be that events itself changed a bit between versions of openshift (e.g. on 3.6 when there is a no pv event is "FailedSheduling" and on 3.9 it is "Failed Mount" with [1] #9946 (comment) |
|
Would be awesome to decide which versions of Openshift/Kubernetes we support and test events on all supported versions not to miss rewording of the error messages in some variants. (Not a requirement for this PR). |
I believe I'm already included and can trigger the ci via |
|
ci-test build report: |
sleshchenko
left a comment
There was a problem hiding this comment.
Looks good
Please take a look my comments
| * @author Sergii Leshchenko | ||
| */ | ||
| public interface ContainerEventHandler { | ||
| public interface EventHandler { |
There was a problem hiding this comment.
Would it more specified if we rename EventHandler to PodEventHandler since it handles only pods events?
| import org.eclipse.che.commons.annotation.Nullable; | ||
|
|
||
| /** | ||
| * The event that should be published when container change occurs, e.g. image pulled, container |
There was a problem hiding this comment.
Please fix java docs. Now it should be published even when no container changes occur. It would be useful to add an example of a case when pod event is published.
There was a problem hiding this comment.
yeah, I plan to double-check all the javadocs and than remove WIP from the PR description
| public class PodEvent { | ||
| private final String podName; | ||
| private final String containerName; | ||
| @Nullable private final String containerName; |
There was a problem hiding this comment.
It would be even more useful to have @Nullable annotation on #getContainerName. Also please note in javadoc of #getContainerName method that it may be nullable and when
| @@ -27,17 +27,13 @@ public final class ContainerEvents { | |||
| private ContainerEvents() {} | |||
There was a problem hiding this comment.
Does it make sense to rename this class too?
There was a problem hiding this comment.
yeah, will rename to the PodEvents
|
P.S. Don't forget to remove WIP and Issue number from PR title since it will be used for changes log |
… & openshift infra (processing both 'container' and 'pod' events) Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
|
ci-test |
|
ci-test build report: |
What does this PR do?
Better handling of unrecoverable events for k8s & openshift infra (processing both 'container' and 'pod' events). Previously only containers (sub-set of pod events) were processed. However, some unrecoverable events happens on pod level and simply not taken into account during processing
Unrecoverableevents. So, after discussion with @sleshchenko it was decided to process all pod events and make more precise filtering on a handler level e.g.MachineLogsPublisherwill still publish only container events andUnrecoverableEventHandlerwould process both container & pod events[WIP] status is just because I want to test it a bit more before pushing and probably add some javadocs
What issues does this PR fix or reference?
che #9946
Release Notes
N/A
Docs PR
N/A (yet)