Detect vdev integration running state #16381
Labels
domain: ci
Anything related to Vector's CI environment
domain: vdev
Anything related to the vdev tooling
type: tech debt
A code change that does not add user value.
When
vdev
starts up an integration test now, it saves the running state in a set of files (by default in$HOME/.local/share/vdev/integration
). This leads to the possibility of the actual state getting out of sync with the saved state, due to system restart, premature container exit, etc.Instead,
vdev
should detect the current state from the process list provided bydocker ps --all
similar to other parts. Using a--format
option can present the data with better defined columns to support whatever data ingest we need.In order to store state data, for example in order to set up the
CONFIG_*
environment variables in the runner to match the composed services, we will need to labels on the composed services which can then be picked up in the process list. Unfortunately, that means having a labels block in all compose files.In order to avoid modifying every compose config file, I propose to load and parse the compose file in
vdev
(already done), inject the labels, and write it to a temporary file before launchingdocker-compose
. When doing so, we can also inject thenetworks
block that is required in all of them.Proposed plan of action:
docker-compose
networks
block into the above and drop from all of the existing configs.labels
into the config.vdev
with compose #17051docker ps --all
forintegration test
subcommand.EnvsDir
setup, as this is the only use.integration stop
subcommand autodetect all resources in use to fully clean up in case of partial shutdown.The text was updated successfully, but these errors were encountered: