From 512f1adf4e283e01ddedc009fd43245e7c6b5ef1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 5 Jul 2023 14:04:22 +0200 Subject: [PATCH] Ignore irrelevant container events These are internal transient states which don't need to reflect in the UI. They happen quickly in bursts, with a "permanent state" event following such as "create", "died", or "remove". Likewise, we are not interested in `podman exec` events, so ignore `exec_died` along with `exec`. This helps to reduce the API calls and thus mitigates out-of-order results; see https://github.com/containers/podman/issues/19124 Also fix the alphabetical sorting of the remaining events. --- src/app.jsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app.jsx b/src/app.jsx index b2755cd4d..d97211ec9 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -331,9 +331,16 @@ class Application extends React.Component { /* The following events do not need to trigger any state updates */ case 'attach': case 'exec': + case 'exec_died': case 'export': case 'import': case 'init': + case 'kill': + case 'mount': + case 'prune': + case 'restart': + case 'sync': + case 'unmount': case 'wait': break; /* The following events need only to update the Container list @@ -349,20 +356,13 @@ class Application extends React.Component { ).then(() => this.updateContainer(id, system, event)); break; case 'checkpoint': + case 'cleanup': case 'create': case 'died': - case 'exec_died': case 'health_status': - case 'kill': - case 'cleanup': - case 'mount': case 'pause': - case 'prune': - case 'restart': case 'restore': case 'stop': - case 'sync': - case 'unmount': case 'unpause': case 'rename': // rename event is available starting podman v4.1; until then the container does not get refreshed after renaming this.updateContainer(id, system, event);