Default values are not restored when removing custom values #356
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I've got bitten by the following behavior recently and I think this might be something the helm chart could (eventually) take care of:
app.inithat is different from the defaultsAt this point I would expect the value to be removed from
app.ini. Instead it stays inapp.ini(after (2)) and is (silently) applied to the instance.In particular I found out about this via
service.ENABLE_BASIC_AUTHENTICATIONwhile going crazy why user/pass auth did not work for git auth.I finally found that in my
app.iniin the running instance there wasENABLE_BASIC_AUTHENTICATION=falseset even though this setting was not applied in the helm chart values (anymore) and it defaults toTRUEactually.I could then reproduce the behavior from above. In fact the only thing that helped was manually entering the pod and deleting
ENABLE_BASIC_AUTHENTICATION = falseto get rid of it. An alternative is to actively set it back to the default again.In summary: removing an
app.inithat was once changed does not restore it's default. Looks like a bug to me? Should be easily reproducible for others using the description above.TODO list for fixing this: (probably incomplete)
additionalConfigSourcesI've reproduced it a few times in the past. To me it seems like a regression from #239. Prior to this PR the app.ini got fully recreated. Now it persists to keep some important immutable settings. I see two ways to fix this:
The second one would require a migration to extract those values from app.ini, if not provided via values.yaml. Which sounds like we would need option 1 to get 2. ?
Changing the category as this behavior is a regression of #239.
https://github.com/go-gitea/gitea/pull/32669 will help us extract all values that must be persistent.