Skip to content

fix(self-hosted): avoid install wizard mail TLS/SSL immutable errors#114011

Open
aldy505 wants to merge 6 commits intogetsentry:masterfrom
aldy505:fix/install-wizard-mail-tls-ssl-4282
Open

fix(self-hosted): avoid install wizard mail TLS/SSL immutable errors#114011
aldy505 wants to merge 6 commits intogetsentry:masterfrom
aldy505:fix/install-wizard-mail-tls-ssl-4282

Conversation

@aldy505
Copy link
Copy Markdown
Collaborator

@aldy505 aldy505 commented Apr 26, 2026

Closes getsentry/self-hosted#4282

Treat mail.use-tls and mail.use-ssl as a linked pair in the required system options response for the install wizard.

If either option is configured on disk with a non-default value, mark both as diskPriority so the wizard does not submit them back through PUT /internal/options/?query=is:required. This avoids the immutable_option failure during first-run setup when self-hosted email settings were already configured in config.yml, including the reported mail.use-tls: true + mail.use-ssl: false case.

Add regression coverage for the disk-configured TLS/SSL case and for the control case where both values still match their defaults.

Treat mail.use-tls and mail.use-ssl as a linked pair in the required
 system options response for the install wizard.

 If either option is configured on disk with a non-default value, mark
 both as diskPriority so the wizard does not submit them back through
 PUT /internal/options/?query=is:required. This avoids the
 immutable_option failure during first-run setup when self-hosted email
 settings were already configured in config.yml, including the reported
 mail.use-tls: true + mail.use-ssl: false case.

 Add regression coverage for the disk-configured TLS/SSL case and for the
 control case where both values still match their defaults.
@aldy505 aldy505 requested review from a team as code owners April 26, 2026 01:30
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 26, 2026
@aldy505 aldy505 added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 26, 2026
@vgrozdanic vgrozdanic added Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests and removed Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests labels Apr 27, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot removed the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 28, 2026
Comment thread src/sentry/api/endpoints/system_options.py Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aldy505 aldy505 added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 28, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot removed the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 28, 2026
@aldy505 aldy505 added Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests and removed Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests labels Apr 28, 2026
@aldy505 aldy505 added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 29, 2026
Comment thread src/sentry/api/endpoints/system_options.py Outdated
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e2b4563. Configure here.

Comment thread src/sentry/api/endpoints/system_options.py Outdated
@github-actions github-actions Bot removed the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 30, 2026
@aldy505 aldy505 added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Immutable option error for email configuration on initial setup screen

3 participants