Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect vdev integration running state #16381

Open
7 tasks
bruceg opened this issue Feb 9, 2023 · 1 comment
Open
7 tasks

Detect vdev integration running state #16381

bruceg opened this issue Feb 9, 2023 · 1 comment
Assignees
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.

Comments

@bruceg
Copy link
Member

bruceg commented Feb 9, 2023

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 by docker 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 launching docker-compose. When doing so, we can also inject the networks block that is required in all of them.

Proposed plan of action:

  • Write parsed compose files to temporary files before running docker-compose
  • Inject networks block into the above and drop from all of the existing configs.
  • Inject labels into the config.
  • Replace custom integration runner in vdev with compose #17051
  • Load process state and labels from docker ps --all for integration test subcommand.
  • Drop EnvsDir setup, as this is the only use.
  • Make integration stop subcommand autodetect all resources in use to fully clean up in case of partial shutdown.
@bruceg bruceg added type: tech debt A code change that does not add user value. domain: ci Anything related to Vector's CI environment domain: vdev Anything related to the vdev tooling labels Feb 9, 2023
@spencergilbert
Copy link
Contributor

As a side note, I've gotten vdev into an unhappy state a few times where I needed to delete the on disk state file - if I manage it again I'll try and leave repro steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants