Skip to content

Commit 3b7a462

Browse files
committed
fix: hide WEBINY_ELASTICSEARCH_INDEX_LOCALE env var
1 parent 35174aa commit 3b7a462

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

packages/cli/utils/loadEnvVariables.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,10 @@ if (project.config.featureFlags) {
4444
process.env.WEBINY_FEATURE_FLAGS = JSON.stringify(project.config.featureFlags);
4545
process.env.REACT_APP_WEBINY_FEATURE_FLAGS = JSON.stringify(project.config.featureFlags);
4646
}
47+
48+
// With 5.38.0, we are hiding the `WEBINY_ELASTICSEARCH_INDEX_LOCALE` env variable and always setting it to `true`.
49+
// This is because this variable is not something users should be concerned with, nor should they be able to change it.
50+
// In order to ensure backwards compatibility, we first check if the variable is set, and if it is, we don't override it.
51+
if (!"WEBINY_ELASTICSEARCH_INDEX_LOCALE" in process.env) {
52+
process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE = "true";
53+
}

packages/cwp-template-aws/template/ddb-es/example.env

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,4 @@ PULUMI_SECRETS_PROVIDER={PULUMI_SECRETS_PROVIDER}
1010
PULUMI_CONFIG_PASSPHRASE={PULUMI_CONFIG_PASSPHRASE}
1111

1212
# Enable debugging mode.
13-
DEBUG=true
14-
15-
# Feature flag to enable adding locale code into Elasticsearch index name
16-
# Enabled in 5.26.0
17-
# If users, which installed before 5.26.0, want to have different indexes per locale in PB, FB and FM please check docs on how to enable those
18-
WEBINY_ELASTICSEARCH_INDEX_LOCALE=true
13+
DEBUG=true

packages/cwp-template-aws/template/ddb-es/example.keep.env

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,4 @@ PULUMI_SECRETS_PROVIDER={PULUMI_SECRETS_PROVIDER}
1010
PULUMI_CONFIG_PASSPHRASE={PULUMI_CONFIG_PASSPHRASE}
1111

1212
# Enable debugging mode.
13-
DEBUG=true
14-
15-
# Feature flag to enable adding locale code into Elasticsearch index name
16-
# Enabled in 5.26.0
17-
# If users, which installed before 5.26.0, want to have different indexes per locale in PB, FB and FM please check docs on how to enable those
18-
WEBINY_ELASTICSEARCH_INDEX_LOCALE=true
13+
DEBUG=true

0 commit comments

Comments
 (0)