ankaios icon indicating copy to clipboard operation
ankaios copied to clipboard

Replace the polling in system tests

Open inf17101 opened this issue 1 year ago • 2 comments

Description

Currently, the stests are implemented to use polling to ask for workload states, workloads ,etc. This leads sometimes to unstable system tests and forces a developer to search for alternative solutions to make the stest stable. Sometimes such workarounds leads to weaker tests and it costs time to implement alternative solutions afterwards.

Goals

Replace the polling method through a better mechanism to avoid missing information for assertions inside stests.

Final result

Summary

To be filled when the final solution is sketched.

Tasks

  • [ ] Task 1
  • [ ] Task 2
  • [ ] ...

inf17101 avatar May 02 '24 08:05 inf17101

Depends on #228

krucod3 avatar May 02 '24 09:05 krucod3

Like discussed, even if we replace the CLI polling, internally the state checker still does polling every 1 sec. However, I have an suggestion for getting rid completely of the internal polling for podman and podman-kube. Podman supports podman-events CLI command that blocks and informs you about every event that occurs for a container or pod. Here is an example recording of me demonstrating podman-events:

https://github.com/user-attachments/assets/c31e373e-732b-493f-be5b-238e7341efc0

This can be also considered to replace the internal polling as well (maybe we can also get rid of the cache). We can parse the lines podman events is reporting or add the --filter=container=<container_name_or_id> to the command to just get the events for a specific container.

I have checked the podman-events documentation and it seems like that this command is available also for previous podman versions (v3.0, ...).

Maybe we need this as an extra issue.

inf17101 avatar Jan 23 '25 09:01 inf17101