Mattermost config hosed by 13.03 upgrade

I just upgraded my omnibus install (on Debian) from 13.0.2 to 13.0.3, and my mattermost service (which was working fine) stopped working, giving a 502 bad gateway error. The log in /var/log/gitlab/mattermost/current shows this error repeatedly:

2020-06-01_08:41:21.23824 Error: failed to load configuration: failed to load: failed to unmarshal config with env overrides: parsing error at line 1, character 1: unexpected end of JSON input

Looking for the config file led me to /var/opt/gitlab/mattermost/config.json, which is completely empty. Running gitlab-ctl reconfigure didn’t do anything, gitlab-ctl check-config shows no errors, gitlab-rake gitlab:check only mentions that I need to upgrade to hashed storage, which has nothing to do with mattermost.

How can I resurrect my Mattermost config?

I just updated to 13.05, but it didn’t fix Mattermost. Since the config file had been emptied, I figured deleting it wouldn’t hurt so I did that and re-ran gitlab-ctl reconfigure, which recreated the config.json file! It still gave a 502 after doing that, so I restarted the mattermost service with gitlab-ctl restart mattermost, and the service reappeared, complete with all chat config and history.