From 8cb12c06e92ddc999c72d03ca6a93333ba205388 Mon Sep 17 00:00:00 2001 From: Landon LaSmith <2432396+LaVLaS@users.noreply.github.com> Date: Tue, 29 Sep 2026 09:35:42 -0400 Subject: [PATCH 1/2] Add Makefile var to override dev.env file (#1688) Signed-off-by: Landon LaSmith (cherry picked from commit f56401cbc87c51334248ce1853b6eaa60932d2d6) --- Makefile | 5 +- .../2026-09-25-makefile-dev-env-override.md | 52 +++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 docs-internal/knowledge/plans/2026-09-25-makefile-dev-env-override.md diff --git a/Makefile b/Makefile index dcd56aa1..99290901 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ # Import development related environment variables from dev.env -ifneq ("$(wildcard dev.env)","") - include dev.env +DEV_ENV_FILE ?= dev.env +ifneq ("$(wildcard $(DEV_ENV_FILE))","") + include $(DEV_ENV_FILE) endif # Default version for the project. diff --git a/docs-internal/knowledge/plans/2026-09-25-makefile-dev-env-override.md b/docs-internal/knowledge/plans/2026-09-25-makefile-dev-env-override.md new file mode 100644 index 00000000..1d9f00db --- /dev/null +++ b/docs-internal/knowledge/plans/2026-09-25-makefile-dev-env-override.md @@ -0,0 +1,52 @@ +# Makefile: Allow overriding dev.env file path + +- **Date:** 2026-09-25 +- **Author:** Landon LaSmith +- **Related PR(s):** N/A +- **Related issue(s) / JIRA:** N/A + +## Context + +The `Makefile` hardcodes the `dev.env` filename when including developer environment +variables. Contributors who want to maintain multiple environment configurations (e.g. +one per cluster, one per test target) have no way to switch without renaming or +symlinking the file. This change introduces a `DEV_ENV_FILE` variable so any `.env` +file can be substituted at `make` invocation time. + +## Approach + +- Add `DEV_ENV_FILE ?= dev.env` before the conditional include block. The `?=` operator + preserves the existing default so no existing workflow is affected. +- Replace the hardcoded `dev.env` in the `include` directive with `$(DEV_ENV_FILE)`. +- The wildcard guard (`ifneq ("$(wildcard ...)", "")`) is updated to use the variable, + so the include is still silently skipped when the file does not exist. + +### Alternatives considered + +- **Symlink convention** — Contributors could symlink `dev.env` to the file they want. + Rejected: symlinks are fiddly, can be accidentally committed, and require a separate + documentation step. +- **Multiple named targets** (e.g. `make dev-env-foo`) — Rejected: adds surface area to + the Makefile and makes it harder to compose with other targets. + +## Scope + +- **In scope:** `Makefile` change only (3 lines). +- **Out of scope:** changes to `dev.env` itself, documentation updates, or any CI + pipeline changes. + +## Validation + +- Manual: `make DEV_ENV_FILE=custom.env ` with a custom env file loads the + correct variables. +- Manual: `make` with no override and an existing `dev.env` continues to work as before. +- Manual: `make` with no override and no `dev.env` present silently skips the include + (regression check). +- No automated tests needed — the change is a build-system convenience with no + runtime code path. + +## Risks and rollback + +- **Known risks:** None. The default value preserves existing behavior exactly. +- **Rollback plan:** Revert the single Makefile commit; no downstream artifacts are + affected. From 8bf5c6847c8d5bfeb7b74bfbaf0fceecb5f78d39 Mon Sep 17 00:00:00 2001 From: Praveen Kumar Shanmugam <58961022+spraveenio@users.noreply.github.com> Date: Tue, 29 Sep 2026 06:46:49 -0700 Subject: [PATCH 2/2] Delete docs-internal/knowledge/plans/2026-09-25-makefile-dev-env-override.md --- .../2026-09-25-makefile-dev-env-override.md | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 docs-internal/knowledge/plans/2026-09-25-makefile-dev-env-override.md diff --git a/docs-internal/knowledge/plans/2026-09-25-makefile-dev-env-override.md b/docs-internal/knowledge/plans/2026-09-25-makefile-dev-env-override.md deleted file mode 100644 index 1d9f00db..00000000 --- a/docs-internal/knowledge/plans/2026-09-25-makefile-dev-env-override.md +++ /dev/null @@ -1,52 +0,0 @@ -# Makefile: Allow overriding dev.env file path - -- **Date:** 2026-09-25 -- **Author:** Landon LaSmith -- **Related PR(s):** N/A -- **Related issue(s) / JIRA:** N/A - -## Context - -The `Makefile` hardcodes the `dev.env` filename when including developer environment -variables. Contributors who want to maintain multiple environment configurations (e.g. -one per cluster, one per test target) have no way to switch without renaming or -symlinking the file. This change introduces a `DEV_ENV_FILE` variable so any `.env` -file can be substituted at `make` invocation time. - -## Approach - -- Add `DEV_ENV_FILE ?= dev.env` before the conditional include block. The `?=` operator - preserves the existing default so no existing workflow is affected. -- Replace the hardcoded `dev.env` in the `include` directive with `$(DEV_ENV_FILE)`. -- The wildcard guard (`ifneq ("$(wildcard ...)", "")`) is updated to use the variable, - so the include is still silently skipped when the file does not exist. - -### Alternatives considered - -- **Symlink convention** — Contributors could symlink `dev.env` to the file they want. - Rejected: symlinks are fiddly, can be accidentally committed, and require a separate - documentation step. -- **Multiple named targets** (e.g. `make dev-env-foo`) — Rejected: adds surface area to - the Makefile and makes it harder to compose with other targets. - -## Scope - -- **In scope:** `Makefile` change only (3 lines). -- **Out of scope:** changes to `dev.env` itself, documentation updates, or any CI - pipeline changes. - -## Validation - -- Manual: `make DEV_ENV_FILE=custom.env ` with a custom env file loads the - correct variables. -- Manual: `make` with no override and an existing `dev.env` continues to work as before. -- Manual: `make` with no override and no `dev.env` present silently skips the include - (regression check). -- No automated tests needed — the change is a build-system convenience with no - runtime code path. - -## Risks and rollback - -- **Known risks:** None. The default value preserves existing behavior exactly. -- **Rollback plan:** Revert the single Makefile commit; no downstream artifacts are - affected.