Skip to content

Add Remember Me Enabled to Application Settings

Drew Blessing requested to merge dblessing_remember_me_application_setting into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Part one of https://gitlab.com/gitlab-org/gitlab/-/issues/369133

Adds a new column to application_settings called remember_me_enabled. The column defaults to true to retain existing default behavior.

This feature will be useful along with a reduced session time for customers with increased compliance requirements around session expiration.

Database

Migrate

main: == [advisory_lock_connection] object_id: 274440, pg_backend_pid: 41658
main: == 20230501163253 AddRememberMeEnabledToApplicationSettings: migrating ========
main: -- add_column(:application_settings, :remember_me_enabled, :boolean, {:default=>true, :null=>false})
main:    -> 0.0036s
main: == 20230501163253 AddRememberMeEnabledToApplicationSettings: migrated (0.0077s)

main: == [advisory_lock_connection] object_id: 274440, pg_backend_pid: 41658
ci: == [advisory_lock_connection] object_id: 274680, pg_backend_pid: 41660
ci: == 20230501163253 AddRememberMeEnabledToApplicationSettings: migrating ========
ci: -- add_column(:application_settings, :remember_me_enabled, :boolean, {:default=>true, :null=>false})
ci:    -> 0.0022s
ci: == 20230501163253 AddRememberMeEnabledToApplicationSettings: migrated (0.0100s)

ci: == [advisory_lock_connection] object_id: 274680, pg_backend_pid: 41660

Rollback

main: == [advisory_lock_connection] object_id: 274780, pg_backend_pid: 1632
main: == 20230501163253 AddRememberMeEnabledToApplicationSettings: reverting ========
main: -- remove_column(:application_settings, :remember_me_enabled, :boolean, {:default=>true, :null=>false})
main:    -> 0.0025s
main: == 20230501163253 AddRememberMeEnabledToApplicationSettings: reverted (0.0087s)

main: == [advisory_lock_connection] object_id: 274780, pg_backend_pid: 1632
ci: == [advisory_lock_connection] object_id: 274720, pg_backend_pid: 2088
ci: == 20230426102200 FixImportSourcesOnApplicationSettingsAfterPhabricatorRemoval: reverting
ci: -- The migration is skipped since it modifies the schemas: [:gitlab_main].
ci: -- This database can only apply migrations in one of the following schemas: [:gitlab_ci, :gitlab_shared, :gitlab_internal].
ci: == 20230426102200 FixImportSourcesOnApplicationSettingsAfterPhabricatorRemoval: reverted (0.0080s)

ci: == [advisory_lock_connection] object_id: 274720, pg_backend_pid: 2088

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Drew Blessing

Merge request reports