Skip to content

Add experience level to user preferences

Dallas Reedy requested to merge add-experience-level-to-user-preferences into master

What does this MR do?

This MR supports the overall functionality needed for the “Choose Your Experience Level” page, which is part of the onboarding issues board experiment.

The page itself has been started in !31415 (merged) and is behind an experiment-based feature flag, which is currently completely disabled.

This MR is meant to be inline with our value of iteration and with a development paradigm of separating structural changes from behavioral changes.

Supports gitlab-org/growth/engineering#5363 (closed)

Migrating Up

> bundle exec rails db:migrate:up VERSION=20200521022725
== 20200521022725 AddExperienceLevelToUserPreferences: migrating ==============
-- add_column(:user_preferences, :experience_level, :integer, {:limit=>2})
   -> 0.0009s
== 20200521022725 AddExperienceLevelToUserPreferences: migrated (0.0010s) =====

Migrating Down

> bundle exec rails db:migrate:down VERSION=20200521022725
== 20200521022725 AddExperienceLevelToUserPreferences: reverting ==============
-- remove_column(:user_preferences, :experience_level, :integer, {:limit=>2})
   -> 0.0064s
== 20200521022725 AddExperienceLevelToUserPreferences: reverted (0.0097s) =====

Redoing the Migration

> bundle exec rails db:migrate:redo VERSION=20200521022725
== 20200521022725 AddExperienceLevelToUserPreferences: reverting ==============
-- remove_column(:user_preferences, :experience_level, :integer, {:limit=>2})
   -> 0.0009s
== 20200521022725 AddExperienceLevelToUserPreferences: reverted (0.0027s) =====

== 20200521022725 AddExperienceLevelToUserPreferences: migrating ==============
-- add_column(:user_preferences, :experience_level, :integer, {:limit=>2})
   -> 0.0008s
== 20200521022725 AddExperienceLevelToUserPreferences: migrated (0.0009s) =====

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

This MR adds a new column to an existing table in Postgres. I am not fully aware of the implications of doing so (i.e. how large that table is in production, for example, or if the chosen column type (smallint) & attribute type (enum) is appropriate for the desired behavior).

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Dallas Reedy

Merge request reports