Skip to content

chore(dev): retire the unused Docker dev environment#25429

Open
pront wants to merge 8 commits into
masterfrom
chore/kill-environment-true
Open

chore(dev): retire the unused Docker dev environment#25429
pront wants to merge 8 commits into
masterfrom
chore/kill-environment-true

Conversation

@pront
Copy link
Copy Markdown
Member

@pront pront commented May 13, 2026

Summary

The make environment / ENVIRONMENT=true Docker/Podman dev shell, and the timberio/vector-dev:latest image it ran in, are no longer in active use. The image rebuilds on a weekly cron with no consumers, the Makefile threads a ${MAYBE_ENVIRONMENT_EXEC} wrapper through every build/test/bench/check recipe, and contributors have long since moved to native toolchains. This PR retires that path end-to-end and replaces the entry point with a contributor-friendly prepare.sh shortcut, hardened so it no longer surprises someone running it on a laptop. Continues the cleanup from #25410 and #25411.

What changes

  • Makefile: removes the ENVIRONMENT_* variables, MAYBE_ENVIRONMENT_* macros, ENVIRONMENT_EXEC / ENVIRONMENT_PREPARE definitions, the four environment* targets, the ${MAYBE_ENVIRONMENT_EXEC} recipe prefix, and the "(Supports ENVIRONMENT=true)" section subtitles. Switches the VDEV macro to ?= so a caller-supplied VDEV (e.g. the pinned binary path exported by .github/actions/setup) wins over the local cargo vdev cargo-alias default.
  • Dead target: drops build-graphql-schema; no graphql-schema binary exists in the workspace.
  • CI: deletes .github/workflows/environment.yml (the weekly cron that built and pushed timberio/vector-dev:latest) and removes the /ci-run-environment review trigger and environment job from ci-review-trigger.yml.
  • Docs: drops the "Using a Docker or Podman environment" section from docs/DEVELOPING.md and adds a pointer to scripts/environment/prepare.sh as the one-shot tooling install.
  • Scripts: deletes scripts/environment/Dockerfile, entrypoint.sh, and setup-helm.sh (orphaned since 2022, pinned ~5-year-old kubectl/helm). The remaining scripts (bootstraps, binstall.sh, prepare.sh, install-protoc.sh) stay; they are still consumed by CI, cross/e2e/regression/tilt Dockerfiles, and the install docs.
  • RFC 2685: marks rfcs/2020-05-25-2685-dev-workflow-simplification.md as archived and points readers at CONTRIBUTING.md / docs/DEVELOPING.md.
  • prepare.sh workstation safety (folded in from enhancement(dev): make prepare.sh safer on workstations #25430): three CI-gated guards so the script no longer surprises a contributor on a laptop. (1) Skip the global safe.directory git config write outside CI; contributors own their checkouts. (2) Refuse to downgrade cargo tools the user has installed at a newer version than the pin (CI starts from nothing and still gets the pin; setting CI=1 forces it locally). (3) Skip the sudo ln -sf into the global npm bin outside CI; print a PATH hint pointing at the project-local node_modules/.bin instead.

How did you test this PR?

  • make help renders cleanly with no stale targets.
  • make -n test, make -n check, make -n bench resolve to bare cargo / $(VDEV) commands.
  • env VDEV=/tmp/vdev make -n check prints /tmp/vdev check rust, confirming caller-supplied VDEV wins.
  • make check-markdown passes.
  • bash -n scripts/environment/prepare.sh and shellcheck are clean.
  • Repo-wide grep for ENVIRONMENT=true, make environment, MAYBE_ENVIRONMENT_EXEC, INSIDE_ENVIRONMENT, timberio/vector-dev, scripts/environment/Dockerfile, scripts/environment/entrypoint, and setup-helm returns only the archived RFC.

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • 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

@github-actions github-actions Bot added docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. domain: ci Anything related to Vector's CI environment domain: rfc labels May 13, 2026
@pront pront changed the title chore(dev): kill ENVIRONMENT=true Docker dev shell chore(dev): remove the legacy Docker dev environment May 13, 2026
@pront pront added no-changelog Changes in this PR do not need user-facing explanations in the release changelog domain: dev Anything related to Vector's development environment and removed domain: rfc labels May 13, 2026
pront and others added 7 commits May 13, 2026 18:06
Strips the `make environment` / `ENVIRONMENT=true` Docker/Podman dev
shell wiring: ENVIRONMENT_* variables, MAYBE_ENVIRONMENT_EXEC /
MAYBE_ENVIRONMENT_COPY_ARTIFACTS macros, ENVIRONMENT_EXEC /
ENVIRONMENT_PREPARE blocks, the `environment`, `environment-prepare`,
`environment-clean`, `environment-push` targets, and the
${MAYBE_ENVIRONMENT_EXEC} prefix on every build/test/bench/check recipe.

Also drops the dead `build-graphql-schema` target: no `graphql-schema`
binary exists in the workspace.

The VDEV macro uses `?=` so a caller-supplied VDEV (e.g. the pinned
prebuilt binary path exported by .github/actions/setup) wins over the
local `cargo vdev` default, avoiding a vdev source recompile per recipe.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Removes .github/workflows/environment.yml (the weekly cron and
workflow_dispatch that built and pushed timberio/vector-dev:latest to
Docker Hub) and the /ci-run-environment review-trigger wiring in
ci-review-trigger.yml.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Removes the "Using a Docker or Podman environment" walkthrough and the
remaining `ENVIRONMENT=true` / `make environment-generate` / `build-dev`
mentions from docs/DEVELOPING.md, matching the Makefile cleanup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deletes scripts/environment/Dockerfile and scripts/environment/entrypoint.sh,
which only existed to build the timberio/vector-dev:latest image used by
`make environment` and the Environment Suite workflow (both removed in
this PR). The other scripts in scripts/environment/ (bootstraps,
`binstall.sh`, `prepare.sh`, `install-protoc.sh`) stay; they are still
consumed by CI, cross builds, e2e/regression/tilt Dockerfiles, and the
install docs.

Updates the comment on the `usermod ... || true` line in
bootstrap-ubuntu-24.04.sh: the deleted Dockerfile was one case, but
more generally the `ubuntu` user may not exist on every host
(GitHub-hosted runners use `runner`), so the `|| true` is still
load-bearing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Docker/Podman dev environment this RFC proposed is no longer
maintained; this PR removes the last of its wiring. Marks the RFC as
archived and points readers to CONTRIBUTING.md and docs/DEVELOPING.md
for current instructions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a tooling-shortcut note in docs/DEVELOPING.md showing
`bash scripts/environment/prepare.sh` as the one-shot way to install
the Rust and npm tooling that the bullet list otherwise enumerates
manually. Same script CI uses, so what contributors get locally
matches what CI installs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
scripts/environment/setup-helm.sh has had no consumers in the tree
since 2022, when nightly.yml / release.yml / CODEOWNERS stopped
referencing it. Only the now-deleted scripts/environment/Dockerfile
kept it alive. Its pins (kubectl v1.18.6, helm v3.2.4, kubeval) are
~5 years old; current Vector k8s e2e drives a separate minikube setup
via scripts/test-e2e-kubernetes.sh.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pront pront force-pushed the chore/kill-environment-true branch from afb70d0 to b055edb Compare May 13, 2026 22:08
@pront pront changed the title chore(dev): remove the legacy Docker dev environment chore(dev): retire the unused Docker dev environment May 13, 2026
@pront pront marked this pull request as ready for review May 13, 2026 22:11
@pront pront requested review from a team as code owners May 13, 2026 22:11
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b055edb37d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +221 to +225
if [[ -z "${CI:-}" ]]; then
echo "npm tools installed under ${npm_tools_dir}/node_modules/.bin"
echo "To use them on PATH, add that directory to your shell rc:"
echo " export PATH=\"${npm_tools_dir}/node_modules/.bin:\$PATH\""
return 0
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep local npm tools discoverable

When prepare.sh is run locally via the new docs, this branch installs markdownlint-cli2/prettier under scripts/environment/npm-tools/node_modules/.bin but returns before making them available on PATH. The follow-up developer commands still invoke those tools by bare name (for example vdev/src/commands/check/markdown.rs calls markdownlint-cli2 and vdev/src/commands/check/fmt.rs calls prettier), so make check-markdown, make check-fmt, and make fmt fail immediately after the advertised one-shot setup unless the user manually edits their shell environment. Either make the local install discoverable for these commands or document/export the required PATH step as part of setup.

Useful? React with 👍 / 👎.

prepare.sh is primarily a CI bootstrap, but docs/DEVELOPING.md now
points contributors at it as the one-shot install. This adds three
CI-gated guards so running the script on a personal laptop is less
surprising. Each guard preserves the existing CI behavior; the
differences only apply when `CI` is unset.

1. `git config --global --add safe.directory "$(pwd)"` is skipped
   outside CI. Contributors own their checkouts and do not hit git's
   dubious-ownership error, so the global config write is avoided.

2. The version-pin check no longer downgrades cargo tools the user has
   already installed at a newer version. CI starts from nothing and
   keeps installing the exact pin; on workstations, a newer-than-pin
   version is kept and the script prints a notice. `CI=1` forces the
   pin if a contributor wants it.

3. The npm tool symlinks into the global npm bin dir are skipped
   outside CI. Avoids `sudo ln -sf` into /usr/local/bin (or equivalent)
   without the user opting in. To keep the make-driven workflow working
   without any contributor PATH edits, the Makefile prepends
   scripts/environment/npm-tools/node_modules/.bin to PATH so vdev's
   bare-name spawns of `markdownlint-cli2` and `prettier` resolve from
   the project-local install.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pront pront force-pushed the chore/kill-environment-true branch from b055edb to 485dce5 Compare May 13, 2026 23:14
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 485dce5793

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

current=$($version_cmd --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)
if [[ -n "$current" ]] && [[ "$current" != "$version" ]]; then
local newest
newest=$(printf '%s\n%s\n' "$current" "$version" | sort -V | tail -1)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid GNU-only version sorting in local setup

When a macOS contributor follows the new docs/DEVELOPING.md shortcut and already has any checked tool installed at a different version, this local-only branch runs sort -V; the default BSD sort on macOS does not support -V, so prepare.sh exits before installing the remaining tools. Use a portable version comparison or explicitly invoke the GNU coreutils binary when available.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. domain: ci Anything related to Vector's CI environment domain: dev Anything related to Vector's development environment domain: rfc 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.

1 participant