From b814d76488fab07fc3c7f0d15fdadeb1d980fc95 Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Thu, 17 Aug 2023 11:16:16 -0300 Subject: [PATCH] config-reset: -tags production (#24277) Somewhere in the build pipeline, we run `make config-reset` to generate a default `config.json` to include with the tarball. Unfortunately, this was being built without the `-tags production` signal that changes the default service environment to `production`, and in turn caused the `CWS` environment to default to testing. The trial licenses returned by the testing environment aren't compatible with the production environment, preventing new customers from starting trials by themselves. As an immmediate workaround, customers can simply delete the `config.json` included with the tarball and start the server anew. Without any further configuration, it will correctly default to the `production` service environment and use the correct `CWS` environment. Fix the tarball generation by adding `-tags production` to the `config-reset` Makefile target. We don't add a dev version of this for now, as it's not really needed given the server creates the right value on startup. Fixes: https://mattermost.atlassian.net/browse/CLD-6137 --- server/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/Makefile b/server/Makefile index e48dc5bd55..ae89157e06 100644 --- a/server/Makefile +++ b/server/Makefile @@ -710,10 +710,10 @@ config-ldap: ## Configures LDAP. @sed -i'' -e 's|"GroupDisplayNameAttribute": ".*"|"GroupDisplayNameAttribute": "cn"|g' config/config.json @sed -i'' -e 's|"GroupIdAttribute": ".*"|"GroupIdAttribute": "entryUUID"|g' config/config.json -config-reset: ## Resets the config/config.json file to the default. - @echo Resetting configuration to default +config-reset: ## Resets the config/config.json file to the default production values. + @echo Resetting configuration to production default rm -f config/config.json - OUTPUT_CONFIG=$(PWD)/config/config.json $(GO) $(GOFLAGS) run ./scripts/config_generator + OUTPUT_CONFIG=$(PWD)/config/config.json $(GO) $(GOFLAGS) run -tags production ./scripts/config_generator diff-config: ## Compares default configuration between two mattermost versions @./scripts/diff-config.sh