Skip to content

Commit

Permalink
fix: hide WEBINY_ELASTICSEARCH_INDEX_LOCALE env var
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Nov 8, 2023
1 parent f2f464c commit 90aca03
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
7 changes: 7 additions & 0 deletions packages/cli/utils/loadEnvVariables.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,10 @@ if (project.config.featureFlags) {
process.env.WEBINY_FEATURE_FLAGS = JSON.stringify(project.config.featureFlags);
process.env.REACT_APP_WEBINY_FEATURE_FLAGS = JSON.stringify(project.config.featureFlags);
}

// With 5.38.0, we are hiding the `WEBINY_ELASTICSEARCH_INDEX_LOCALE` env variable and always setting it to `true`.
// This is because this variable is not something users should be concerned with, nor should they be able to change it.
// In order to ensure backwards compatibility, we first check if the variable is set, and if it is, we don't override it.
if (!"WEBINY_ELASTICSEARCH_INDEX_LOCALE" in process.env) {
process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE = "true";
}
7 changes: 1 addition & 6 deletions packages/cwp-template-aws/template/ddb-es/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,4 @@ PULUMI_SECRETS_PROVIDER={PULUMI_SECRETS_PROVIDER}
PULUMI_CONFIG_PASSPHRASE={PULUMI_CONFIG_PASSPHRASE}

# Enable debugging mode.
DEBUG=true

# Feature flag to enable adding locale code into Elasticsearch index name
# Enabled in 5.26.0
# 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
WEBINY_ELASTICSEARCH_INDEX_LOCALE=true
DEBUG=true
7 changes: 1 addition & 6 deletions packages/cwp-template-aws/template/ddb-es/example.keep.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,4 @@ PULUMI_SECRETS_PROVIDER={PULUMI_SECRETS_PROVIDER}
PULUMI_CONFIG_PASSPHRASE={PULUMI_CONFIG_PASSPHRASE}

# Enable debugging mode.
DEBUG=true

# Feature flag to enable adding locale code into Elasticsearch index name
# Enabled in 5.26.0
# 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
WEBINY_ELASTICSEARCH_INDEX_LOCALE=true
DEBUG=true

0 comments on commit 90aca03

Please sign in to comment.