Skip to content

Conversation

pront
Copy link
Member

@pront pront commented Oct 9, 2025

Summary

Replaced file-based state tracking with Docker Compose API queries.

State Management

  • Query docker compose ps/ls for container status (instead of reading .tmp/envs/ files)
  • Now using the project_name() method to detect a setup status
  • Reuse code to find active environment across commands

Temp File Elimination

  • Removed all temp file creation and cleanup logic
  • Compose files now use ${VECTOR_NETWORK} environment variable
  • Pass network configuration via environment instead of rewriting compose files to temp locations
  • Updated all 33 compose.yaml files with network configuration block

Benefits

  • Single source of truth: Docker API instead of state files
  • No temp file creation or cleanup needed
  • More reliable: queries actual container state
  • Handles multiple environments and special characters in environment names

Vector configuration

N/A

How did you test this PR?

Inspected operation and results from:

./scripts/run-integration-test.sh
  • Started and stopped.
  • Started, attempt to start another one and got the expected Error: environment is already up

CI will run all tests in the MQ as well.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

@github-actions github-actions bot added domain: ci Anything related to Vector's CI environment domain: vdev Anything related to the vdev tooling labels Oct 9, 2025
@pront pront added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Oct 9, 2025
@pront pront changed the title Pront vdev compose env refactoring chore(vdev): refactor to avoid temp files and leverage docker APIs Oct 9, 2025
@pront pront marked this pull request as ready for review October 9, 2025 17:39
@pront pront requested a review from a team as a code owner October 9, 2025 17:39
Copy link
Contributor

@thomasqueirozb thomasqueirozb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@pront pront enabled auto-merge October 9, 2025 18:29
@pront pront disabled auto-merge October 9, 2025 18:48
@pront pront added this pull request to the merge queue Oct 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 10, 2025
@thomasqueirozb thomasqueirozb added this pull request to the merge queue Oct 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 16, 2025
Copy link
Contributor

@thomasqueirozb thomasqueirozb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ci-run-integration-postgres

@thomasqueirozb thomasqueirozb added this pull request to the merge queue Oct 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 16, 2025
@thomasqueirozb thomasqueirozb added this pull request to the merge queue Oct 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 16, 2025
@thomasqueirozb thomasqueirozb added this pull request to the merge queue Oct 17, 2025
Merged via the queue into master with commit dc60da0 Oct 17, 2025
46 checks passed
@thomasqueirozb thomasqueirozb deleted the pront-vdev-compose-env-refactoring branch October 17, 2025 14:27
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 no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants