Fix backup config stripping for when AWS & GCS backups are disabled #1725
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.
The
sed
command that has been changed in this PR was too tolerant and found a section in the configuration template that is irrelevant to the backup configuration, specifically this line. Consequently it deleted a large portion of the configuration down to the relevant end marker that was required to configure other GitLab features such as object storage, LFS, OmniAuth, etc.This change causes sed to find the correct line now by telling it to match with leading whitespaces.
It may be a good idea to list issues in this issue tracker that are affected by this here for reference.
Potentially related issues:
GITLAB_GRAVATAR_ENABLED
is affected here if backups are disabled)Changes as they were made by the faulty
sed
commandList of affected configuration variables
AWS_BACKUP_ACCESS_KEY_ID
(ineffective with AWS/GCS backups disabled anyways)AWS_BACKUP_BUCKET
(ineffective with AWS/GCS backups disabled anyways)AWS_BACKUP_ENDPOINT
(ineffective with AWS/GCS backups disabled anyways)AWS_BACKUP_MULTIPART_CHUNK_SIZE
(ineffective with AWS/GCS backups disabled anyways)AWS_BACKUP_PATH_STYLE
(ineffective with AWS/GCS backups disabled anyways)AWS_BACKUP_REGION
(ineffective with AWS/GCS backups disabled anyways)AWS_BACKUP_SECRET_ACCESS_KEY
(ineffective with AWS/GCS backups disabled anyways)AWS_BACKUP_STORAGE_CLASS
(ineffective with AWS/GCS backups disabled anyways)GCS_BACKUP_ACCESS_KEY_ID
(ineffective with AWS/GCS backups disabled anyways)GCS_BACKUP_BUCKET
(ineffective with AWS/GCS backups disabled anyways)GCS_BACKUP_SECRET_ACCESS_KEY
(ineffective with AWS/GCS backups disabled anyways)GITALY_CLIENT_PATH
GITALY_TOKEN
GITLAB_ARTIFACTS_OBJECT_STORE_BACKGROUND_UPLOAD
GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID
GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT
GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_HOST
GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE
GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_REGION
GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY
GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_PROVIDER
GITLAB_ARTIFACTS_OBJECT_STORE_ENABLED
GITLAB_ARTIFACTS_OBJECT_STORE_PROXY_DOWNLOAD
GITLAB_ARTIFACTS_OBJECT_STORE_REMOTE_DIRECTORY
GITLAB_BACKUP_ARCHIVE_PERMISSIONS
GITLAB_BACKUP_DIR
GITLAB_BACKUP_EXPIRY
GITLAB_BACKUP_PG_SCHEMA
GITLAB_BUILDS_DIR
GITLAB_GRAVATAR_ENABLED
GITLAB_GRAVATAR_HTTPS_URL
GITLAB_GRAVATAR_HTTP_URL
GITLAB_LFS_ENABLED
GITLAB_LFS_OBJECTS_DIR
GITLAB_LFS_OBJECT_STORE_BACKGROUND_UPLOAD
GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID
GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT
GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_HOST
GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE
GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_REGION
GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY
GITLAB_LFS_OBJECT_STORE_CONNECTION_PROVIDER
GITLAB_LFS_OBJECT_STORE_DIRECT_UPLOAD
GITLAB_LFS_OBJECT_STORE_ENABLED
GITLAB_LFS_OBJECT_STORE_PROXY_DOWNLOAD
GITLAB_LFS_OBJECT_STORE_REMOTE_DIRECTORY
GITLAB_MATTERMOST_ENABLED
GITLAB_MATTERMOST_URL
GITLAB_NOTIFY_ON_BROKEN_BUILDS
GITLAB_NOTIFY_PUSHER
GITLAB_PAGES_ARTIFACTS_SERVER
GITLAB_PAGES_DOMAIN
GITLAB_PAGES_ENABLED
GITLAB_PAGES_EXTERNAL_HTTP
GITLAB_PAGES_EXTERNAL_HTTPS
GITLAB_PAGES_HTTPS
GITLAB_PAGES_PORT
GITLAB_PIPELINE_SCHEDULE_WORKER_CRON
GITLAB_REGISTRY_API_URL
GITLAB_REGISTRY_DIR
GITLAB_REGISTRY_ENABLED
GITLAB_REGISTRY_HOST
GITLAB_REGISTRY_ISSUER
GITLAB_REGISTRY_KEY_PATH
GITLAB_REGISTRY_PORT
GITLAB_REPOS_DIR
GITLAB_SHARED_DIR
GITLAB_SIDEKIQ_LOG_FORMAT
GITLAB_UPLOADS_BASE_DIR
GITLAB_UPLOADS_OBJECT_STORE_BACKGROUND_UPLOAD
GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID
GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT
GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_HOST
GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE
GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_REGION
GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY
GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_PROVIDER
GITLAB_UPLOADS_OBJECT_STORE_DIRECT_UPLOAD
GITLAB_UPLOADS_OBJECT_STORE_ENABLED
GITLAB_UPLOADS_OBJECT_STORE_PROXY_DOWNLOAD
GITLAB_UPLOADS_OBJECT_STORE_REMOTE_DIRECTORY
GITLAB_UPLOADS_STORAGE_PATH
LDAP_ACTIVE_DIRECTORY
LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN
LDAP_BASE
LDAP_BIND_DN
LDAP_BLOCK_AUTO_CREATED_USERS
LDAP_CA_FILE
LDAP_ENABLED
LDAP_HOST
LDAP_LABEL
LDAP_LOWERCASE_USERNAMES
LDAP_METHOD
LDAP_PASS
LDAP_PORT
LDAP_SSL_VERSION
LDAP_TIMEOUT
LDAP_UID
LDAP_USER_FILTER
LDAP_VERIFY_SSL
OAUTH_ALLOW_SSO
OAUTH_AUTH0_CLIENT_ID
OAUTH_AUTH0_CLIENT_SECRET
OAUTH_AUTH0_DOMAIN
OAUTH_AUTHENTIQ_CLIENT_ID
OAUTH_AUTHENTIQ_REDIRECT_URI
OAUTH_AUTHENTIQ_SCOPE
OAUTH_AUTO_LINK_LDAP_USER
OAUTH_AUTO_LINK_SAML_USER
OAUTH_AUTO_SIGN_IN_WITH_PROVIDER
OAUTH_AZURE_API_KEY
OAUTH_AZURE_API_SECRET
OAUTH_AZURE_TENANT_ID
OAUTH_BITBUCKET_API_KEY
OAUTH_BITBUCKET_APP_SECRET
OAUTH_BLOCK_AUTO_CREATED_USERS
OAUTH_CAS3_DISABLE_SSL_VERIFICATION
OAUTH_CAS3_LABEL
OAUTH_CAS3_LOGIN_URL
OAUTH_CAS3_LOGOUT_URL
OAUTH_CAS3_SERVER
OAUTH_CAS3_VALIDATE_URL
OAUTH_CROWD_APP_NAME
OAUTH_CROWD_APP_PASSWORD
OAUTH_CROWD_SERVER_URL
OAUTH_ENABLED
OAUTH_EXTERNAL_PROVIDERS
OAUTH_FACEBOOK_API_KEY
OAUTH_FACEBOOK_APP_SECRET
OAUTH_GITHUB_API_KEY
OAUTH_GITHUB_APP_SECRET
OAUTH_GITHUB_SCOPE
OAUTH_GITHUB_URL
OAUTH_GITHUB_VERIFY_SSL
OAUTH_GITLAB_API_KEY
OAUTH_GITLAB_APP_SECRET
OAUTH_GITLAB_SCOPE
OAUTH_GOOGLE_API_KEY
OAUTH_GOOGLE_APPROVAL_PROMPT
OAUTH_GOOGLE_APP_SECRET
OAUTH_GOOGLE_RESTRICT_DOMAIN
OAUTH_SAML_ASSERTION_CONSUMER_SERVICE_URL
OAUTH_SAML_ATTRIBUTE_STATEMENTS_EMAIL
OAUTH_SAML_ATTRIBUTE_STATEMENTS_FIRST_NAME
OAUTH_SAML_ATTRIBUTE_STATEMENTS_LAST_NAME
OAUTH_SAML_ATTRIBUTE_STATEMENTS_NAME
OAUTH_SAML_EXTERNAL_GROUPS
OAUTH_SAML_GROUPS_ATTRIBUTE
OAUTH_SAML_IDP_CERT_FINGERPRINT
OAUTH_SAML_IDP_SSO_TARGET_URL
OAUTH_SAML_ISSUER
OAUTH_SAML_LABEL
OAUTH_SAML_NAME_IDENTIFIER_FORMAT
OAUTH_TWITTER_API_KEY
OAUTH_TWITTER_APP_SECRET