ApplicatonSettings not tolerant of missing DB columns
When columns are added to ApplicationSettings via migrations, it's possible that the migrations do not complete before the application starts with the code using the new attribute, resulting in possible errors when attempting to use those values.
The comment in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/current_settings.rb#L40-56 states:
# If there are pending migrations, it's possible there are columns that
# need to be added to the application settings. To prevent Rake tasks
# and other callers from failing, use any loaded settings and return
# defaults for missing columns.
so we try to handle it. However it does not seem to be working, partially due to https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/models/concerns/cacheable_attributes.rb#L25-32
In a quick discussion with @godfat , he said "now I feel maybe we can utilize the new FakeApplicationSetting
, so we can pass values which don't have a corresponding column yet"
Edited by Brett Walker