Ignore the unused early_access_studio_participant user preference
What does this MR do and why?
user_preferences.early_access_studio_participant was added in !209523 (merged) for the Project Studio early access rollout: a post-deployment migration set it, on GitLab.com only, for members of groups with Experiment and Beta features turned on, and Users::ProjectStudio#available? read it behind the project_studio_early_access feature flag. The rollout issue, #577848 (closed), closed on 2025-11-27, and on master neither the flag nor Users::ProjectStudio exists any more. The only reference to the column left in the application is a validation in UserPreference, with its two spec examples.
This MR is the first of the three steps in Dropping columns: it ignores the column in UserPreference and removes the validation and its examples. The two have to go together. Once the column is ignored the attribute has no reader, and the validation raises NoMethodError whenever a user preference is validated: with only the ignore rule added, 67 of the 101 examples in spec/models/user_preference_spec.rb fail that way, and the validation's own two examples fail because the attribute no longer exists.
The rule is remove_with: '19.8', remove_after: '2026-12-17', which assumes this merges in 19.6: the column is dropped in a post-deployment migration in 19.7, and the rule removed in 19.8 once 19.7 has shipped on 2026-12-17, the third Thursday of December. If this merges later, the values have to move with it; if it merges earlier, they are later than needed, which is safe.
There is no migration here and no change to the schema. The column stays boolean DEFAULT false NOT NULL, so the rows Rails inserts while the column is ignored still get a value.
The follow-ups, which I can open once this merges:
- 19.7: a post-deployment migration that removes the column, with a
downthat adds it back asboolean, defaultfalse, not null. - 19.8: remove the
ignore_columnrule.
References
Related to #578235, which asks for the column's removal. This MR is step 1 of 3, so it does not close the issue.
- !209523 (merged) added the column, the validation and the reader; #577848 (closed) tracked the feature flag rollout.
- !256130 (merged) did the same first step for
use_work_items_viewon this model.
Screenshots or screen recordings
No UI change.
spec/models/user_preference_spec.rb |
Examples | Failures |
|---|---|---|
master at 5a028408 |
101 | 0 |
master with only the ignore_column line added |
101 | 69: 67 NoMethodError, 2 AttributeDoesNotExistError |
| This branch | 99 | 0 |
One of the 67 NoMethodError failures with only the ignore rule added
1) UserPreference validations is expected to validate that :tab_width looks like an integer greater than or equal to 1 and less than or equal to 12
Failure/Error:
is_expected.to validate_numericality_of(:tab_width)
.only_integer
.is_greater_than_or_equal_to(Gitlab::TabWidth::MIN)
.is_less_than_or_equal_to(Gitlab::TabWidth::MAX)
NoMethodError:
undefined method `early_access_studio_participant' for an instance of UserPreference
# ./spec/models/user_preference_spec.rb:13:in `block (3 levels) in <top (required)>'How to set up and validate locally
bundle exec rspec spec/models/user_preference_spec.rb- In a Rails console,
UserPreference.column_names.include?('early_access_studio_participant')isfalseon this branch andtrueonmaster, whileUserPreference.connection.column_exists?(:user_preferences, :early_access_studio_participant)istrueon both, andUserPreference.new.valid?runs without raising on both. bundle exec rake db:obsolete_ignored_columnsdoes not list the new rule, since the column still exists.
I ran all three in the test environment. Beyond the model spec, on this branch the delegations and ensure user preference blocks of spec/models/user_spec.rb pass (100 examples), and so do spec/graphql/types/user_preferences_type_spec.rb and the rest of spec/controllers/profiles/preferences_controller_spec.rb and spec/requests/api/graphql/mutations/user_preferences/update_spec.rb. Three examples of the last two files fail on my machine with LoadError: cannot load such file -- sass from ViteHelper#universal_path_to_stylesheet, and the same three fail the same way with master's model and spec, so they are about my local asset setup and not this change. RuboCop reports no offenses on the two files, and both commit message linters pass.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.