Skip to content

feat(featureflags): env fallback for build-ensure-free-disk-space - #3781

Open
AdaAibaby wants to merge 1 commit into
e2b-dev:mainfrom
AdaAibaby:fix/build-ensure-free-disk-env
Open

AdaAibaby wants to merge 1 commit into
e2b-dev:mainfrom
AdaAibaby:fix/build-ensure-free-disk-env

Conversation

@AdaAibaby

@AdaAibaby AdaAibaby commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

What

Add an env-var fallback to the build-ensure-free-disk-space feature flag:

BuildEnsureFreeDiskSpace = NewBoolFlag("build-ensure-free-disk-space", envBoolOr("BUILD_ENSURE_FREE_DISK_SPACE", false))

Why

On a self-hosted cluster without LaunchDarkly, a bool flag resolves to its hardcoded fallback and only a rebuild can change it. This makes the build-time rootfs grow (ensurefreedisk phase) impossible to toggle at deploy time.

With this change the operator can enable it by adding an env to the orchestrator nomad job:

env {
  BUILD_ENSURE_FREE_DISK_SPACE = "true"
}

Notes

  • Mirrors the established envBoolOr pattern already used by UFFD_INSTALL_DEDUP, PAUSE_REFUSAL_RESTORE, CREATE_MEMORY_REFUSAL, CREATE_HUGEPAGE_ADMISSION, ENVD_BINARY_CACHE.
  • Default is unchanged (false); LaunchDarkly still overrides when present.
  • One-line change; gofmt/go vet/build clean.

/cc @ryan-sana

Let BUILD_ENSURE_FREE_DISK_SPACE env override the flag fallback, so a
self-hosted cluster without LaunchDarkly can enable the build-time rootfs
grow by adding env BUILD_ENSURE_FREE_DISK_SPACE=true to the orchestrator
nomad job. Mirrors the existing envBoolOr pattern (UFFD_INSTALL_DEDUP,
CREATE_HUGEPAGE_ADMISSION, etc.). Default unchanged (false).

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant