Skip to content
Snippets Groups Projects
Commit fcc97788 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Merge branch '425742-ignoring-the-column-force_full_reconciliation' into 'master'

Ignore the column force_full_reconciliation in workspaces

See merge request !132230



Merged-by: default avatarDouglas Barbosa Alexandre <dbalexandre@gmail.com>
Approved-by: default avatarSiddharth Dungarwal <sdungarwal@gitlab.com>
Approved-by: default avatarDouglas Barbosa Alexandre <dbalexandre@gmail.com>
Approved-by: Shekhar Patnaik's avatarShekhar Patnaik <spatnaik@gitlab.com>
Co-authored-by: Alper Akgun's avatarAlper Akgun <aakgun@gitlab.com>
parents 9cf5a5da cb648b98
No related branches found
No related tags found
1 merge request!132230Ignore the column force_full_reconciliation in workspaces
Pipeline #1011380539 failed
......@@ -6,6 +6,7 @@ module RemoteDevelopment
class Workspace < ApplicationRecord
include Sortable
include RemoteDevelopment::Workspaces::States
include IgnorableColumns
MAX_HOURS_BEFORE_TERMINATION_LIMIT = 120
......@@ -37,6 +38,8 @@ class Workspace < ApplicationRecord
validates :editor, inclusion: { in: ['webide'], message: "'webide' is currently the only supported editor" }
validates :max_hours_before_termination, numericality: { less_than_or_equal_to: MAX_HOURS_BEFORE_TERMINATION_LIMIT }
ignore_column :force_full_reconciliation, remove_with: '16.7', remove_after: '2023-11-22'
scope :with_desired_state_updated_more_recently_than_last_response_to_agent, -> do
# noinspection SqlResolve - https://handbook.gitlab.com/handbook/tools-and-tips/editors-and-ides/jetbrains-ides/tracked-jetbrains-issues/#ruby-31542
where('desired_state_updated_at >= responded_to_agent_at').or(where(responded_to_agent_at: nil))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment