Fix: configs being reset#3064
Conversation
fix: configs not being applied correctly.
Greptile SummaryThis PR fixes two related bugs where updating deployment retention or logging settings would incorrectly reset other config values: boolean fields (
Confidence Score: 3/5The fix is correct within the four touched files, but the same bugs remain active in more than a dozen other settings components — merging as-is leaves most settings-update paths still capable of resetting The All sibling settings update files not touched by this PR: Important Files Changed
Reviews (1): Last reviewed commit: "bump: lock." | Re-trigger Greptile |
…ngs updates Extends the fix from appwrite#3064 to the remaining 20 settings update components for both functions and sites. Two bugs were present in every file not touched by that PR: 1. `enabled`, `logging`, and `providerSilentMode` were passed through `|| undefined` instead of `?? undefined`, causing `false` values to be silently coerced to `undefined` and reset to their API defaults whenever any other setting was saved. 2. `deploymentRetention` was absent from every partial-update payload, so saving name, timeout, scopes, schedule, runtime, permissions, resource limits, build command, events, build triggers, or repository settings would silently reset the retention value. Also fixes `providerSilentMode: silentMode || undefined` in sites/ updateRepository.svelte to `silentMode` (matching the functions version), so disabling silent mode is correctly preserved on save.
What does this PR do?
Fixes the case where the deployment retention and logging were not applied correctly.
Test Plan
Manual.
Related PRs and Issues
N/A.
Have you read the Contributing Guidelines on issues?
Yes.