Repository navigation
Pass the .env.example keys the backend reads to the compose containers - #594
Merged
Merged
Conversation
25 keys the template offered (GATE_*, EPSS_*, LOGIN_THROTTLE_*, rate limits, task limits, GitLab comment settings) never reached a container. They now sit in the shared anchor with the code's default after ":-". TOOLCHAIN_CACHE_ROOTS defaulted to empty, which the code reads as an empty list, so the cache cleaner reclaimed nothing; it now carries the code's list. The key contract test classifies every template key as passed or deliberately kept out, and checks compose defaults against the code's.
The per-key reason check walked every backend module once per key and hit the per-test timeout in CI.
Pin the anchor entries the default check cannot parse, account for every key passed empty (crypto key now checked, forwarded tool settings listed), require ENV rather than ARG for the image reason, and assert each wrong reason fails for its own cause. Document shell precedence for the comment tokens and fixed nightly backup retention, and add changelog upgrade notes.
docker-compose.yml passes SCANCODE_ENABLED=true while the code default, and so the Helm chart, is off. Say so in .env.example and add the missing reference row (EN/KO); keep the guard's exemption with that reason.
Compose passes SCANCODE_ENABLED=true by default; installs without compose, Helm included, must set it explicitly. Docstring only.
haksungjang
force-pushed
the
fix/583-env-example-keys
branch
from
October 25, 2026 01:04
6a69c82 to
595e7db
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docker-compose.ymlonly passes the keys it names in a service'senvironment, and 25 keys that.env.exampleoffers and the backend reads were never named: theGATE_*axis switches,EPSS_*,LOGIN_THROTTLE_*, three rate limits, the default task time limits,STALE_QUEUED_SCAN_GRACE_SECONDS,REQUIRE_DB_ROLE_SEPARATION,GROUP_CASCADE_ENABLED,CONTAINER_SCAN_ALLOWED_REGISTRIESand the GitLab comment settings. They are now in the shared anchor. Where the code has a default, the value after:-is that default, because${KEY:-}hands the process an empty string andos.getenv(KEY, default)returns it. Where the code has none, a test shows an empty value takes the same path as an unset one.Checking every anchor default against the code turned up one live case of that problem:
TOOLCHAIN_CACHE_ROOTSwas passed as empty, whichtoolchain_cache_roots()reads as an empty list, so the toolchain cache cleaner had nothing to reclaim. Both compose files now carry the code's list.SCANCODE_ENABLEDalso differs (compose on, code and template off); it is recorded as a known difference rather than changed here, since flipping it changes what existing deployments scan.test_config_key_contract.pynow classifies every.env.examplekey as passed or kept out for a stated reason (compose substitution, image build metadata, host scripts, DSN parts, the owner DSN, dev only), checks each reason against the files it names, compares anchor defaults with the code's, and requires an empty-reads-as-unset check for every key passed empty without a code default. The template and reference pages now say which keys reach the containers; the build metadata lines in.env.exampleare commented out because the image sets them, and the backup retention text no longer claims the nightly backups readBACKUP_RETENTION_DAYS.Every service's config hash changes with this anchor, so the upgrade UAT should be dispatched on this branch.
Closes #583