Skip to content

Commit

Permalink
Ignore irrelevant container events
Browse files Browse the repository at this point in the history
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 containers/podman#19124

Also fix the alphabetical sorting of the remaining events.
  • Loading branch information
martinpitt committed Jul 13, 2023
1 parent c10a8aa commit a8183c4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit a8183c4

Please sign in to comment.