chore(env): rename KOBO_SUPPORT_EMAIL to CONSTANCE_SUPPORT_EMAIL DEV-1976#373
Open
platreth wants to merge 1 commit into
Open
chore(env): rename KOBO_SUPPORT_EMAIL to CONSTANCE_SUPPORT_EMAIL DEV-1976#373platreth wants to merge 1 commit into
platreth wants to merge 1 commit into
Conversation
…1976 Match the Constance env-var standardization in kpi (CONSTANCE_ prefix). Paired with kobotoolbox/kpi#7230 and kobotoolbox/kobo-install#279 — must ship together.
platreth
marked this pull request as ready for review
July 9, 2026 10:48
noliveleger
approved these changes
Jul 9, 2026
noliveleger
left a comment
Contributor
There was a problem hiding this comment.
LGTM but do not merge it.
We will to merge it when KPI changes are going to be released.
platreth
added a commit
to kobotoolbox/kpi
that referenced
this pull request
Jul 15, 2026
… prefix DEV-1976 (#7230) ### 🔗 Related PRs Part of a 3-repo Constance env-var standardization: - **kobotoolbox/kobo-install#279** — same rename in the kobo-install env template - **kobotoolbox/kobo-docker#373** — same rename in the kobo-docker default env file Backward compatibility is preserved (see below), so these can land independently — the deploy-repo PRs simply complete the migration to the new names. ### 📣 Summary Standardize all Constance override env vars on a single `CONSTANCE_` prefix. ### 📖 Description The env vars that override Constance defaults used three conventions (bare, `KOBO_`, `CONSTANCE_`). This unifies them on `CONSTANCE_`, matching the existing `CONSTANCE_ASR_MT_GOOGLE_*` precedent. Renamed: - `KOBO_SUPPORT_EMAIL` → `CONSTANCE_SUPPORT_EMAIL` - `KOBO_SUPPORT_URL` → `CONSTANCE_SUPPORT_URL` - `KOBO_ACADEMY_URL` → `CONSTANCE_ACADEMY_URL` - `KOBO_COMMUNITY_URL` → `CONSTANCE_COMMUNITY_URL` - `USAGE_LIMIT_ENFORCEMENT` → `CONSTANCE_USAGE_LIMIT_ENFORCEMENT` (env fallback in `base.py` + pytest `env` in `pyproject.toml`) **Backward compatible:** each override reads the new `CONSTANCE_`-prefixed variable and falls back to the deprecated name (`KOBO_*` / bare) when it's unset, emitting a `DeprecationWarning` so deployments know to migrate. Old env vars keep working — no hard break. The fallback logic lives in a new `constance_env` helper in `kobo/settings/utils.py`, moved out of `base.py` along with `dj_stripe_request_callback_method`. ### ✅ Test plan - [x] `test_api_environment.py` — both settings axes - [x] usage-limit-enforcement tests (KPI submissions, OpenRosa, subsequences) - [x] deprecated env var still read + `DeprecationWarning` fired
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.
🔗 Related PRs
Part of a 3-repo Constance env-var standardization:
CONSTANCE_SUPPORT_EMAIL)kpi keeps backward compatibility (old names still read, with a
DeprecationWarning), so this can land independently — it simply migrates the default env file to the new name.Description
Renames
KOBO_SUPPORT_EMAIL→CONSTANCE_SUPPORT_EMAILin the default django env file. Only the var name changes; the value is unchanged.