bug: sync-config silently drops smtp_clicktracking_off from smtp_settings
Describe the bug
When applying instance configuration via windmill sync-config <config.yaml>, any smtp_clicktracking_off key specified under global_settings.smtp_settings is silently dropped during deserialization. It is omitted from the JSON persisted to the global_settings table, causing the "Disable click tracking on links" toggle in the Instance Settings UI to remain off (false).
To reproduce
- Create a
windmill-config.yamlwith:
global_settings:
smtp_settings:
smtp_host: "smtp.example.com"
smtp_port: 587
smtp_clicktracking_off: true- Run
windmill sync-config /path/to/windmill-config.yaml. - Open Windmill Web UI -> Instance Settings -> SMTP configuration.
- Observe that the toggle "Disable click tracking on links" is still unchecked (
false), and inspecting theglobal_settingstable in Postgres (SELECT value FROM global_settings WHERE name = 'smtp_settings';) showssmtp_clicktracking_offwas omitted.
Expected behavior
smtp_clicktracking_off: true should be parsed and persisted into global_settings, and the toggle in Instance Settings should reflect true.
Application version
v1.818.0
Additional Context
Root Cause:
In backend/windmill-common/src/instance_config.rs, the SmtpSettings struct lacks smtp_clicktracking_off:
pub struct SmtpSettings {
pub smtp_host: Option<String>,
pub smtp_username: Option<String>,
pub smtp_password: Option<StringOrSecretRef>,
pub smtp_port: Option<u16>,
pub smtp_from: Option<String>,
pub smtp_tls_implicit: Option<bool>,
pub smtp_disable_tls: Option<bool>,
}Unlike GlobalSettings and OAuthClient, SmtpSettings does not have a catch-all extra field (#[serde(flatten)]). Serde ignores smtp_clicktracking_off during deserialization, and to_settings_map() serializes the struct back to JSON without it.
Meanwhile, frontend/src/lib/components/instanceSettings/SmtpSettings.svelte binds the toggle to $values['smtp_settings'].smtp_clicktracking_off.
Suggested Fix:
Add pub smtp_clicktracking_off: Option<bool> (or #[serde(flatten)] pub extra: BTreeMap<String, serde_json::Value>) to SmtpSettings in backend/windmill-common/src/instance_config.rs.
Source: windmill-labs/windmill