diff --git a/ee/lib/tasks/gitlab/duo_workflow/duo_workflow.rake b/ee/lib/tasks/gitlab/duo_workflow/duo_workflow.rake index ada477bbc20c9377bbae99a39d34a11839ae4168..ba2decd39d18e77282efc6a6db62d7f910f8507b 100644 --- a/ee/lib/tasks/gitlab/duo_workflow/duo_workflow.rake +++ b/ee/lib/tasks/gitlab/duo_workflow/duo_workflow.rake @@ -37,7 +37,7 @@ namespace :gitlab do # Create checkpoint JSONB data checkpoint_data = { "v" => 1, - "id" => SecureRandom.uuid_v7, + "id" => Gitlab::Utils.uuid_v7, "ts" => timestamp, "pending_sends" => [], "versions_seen" => { @@ -132,8 +132,8 @@ namespace :gitlab do } { - parent_ts: step > 0 ? SecureRandom.uuid_v7 : nil, - thread_ts: SecureRandom.uuid_v7, + parent_ts: step > 0 ? Gitlab::Utils.uuid_v7 : nil, + thread_ts: Gitlab::Utils.uuid_v7, checkpoint: checkpoint_data, metadata: metadata } diff --git a/ee/spec/tasks/gitlab/duo_workflow/duo_workflow_spec.rb b/ee/spec/tasks/gitlab/duo_workflow/duo_workflow_spec.rb index d9a48aedf3c5730b690b8eefbbfb30dc044e9b48..fd8e2d756fe67128d2d02e9bf9e89c9cd8e8f896 100644 --- a/ee/spec/tasks/gitlab/duo_workflow/duo_workflow_spec.rb +++ b/ee/spec/tasks/gitlab/duo_workflow/duo_workflow_spec.rb @@ -82,13 +82,12 @@ ) end - it 'creates checkpoints for each workflow', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/560512' do + it 'creates checkpoints for each workflow' do expect { run_rake_task('gitlab:duo_workflow:populate', '5', '2') } .to change { Ai::DuoWorkflows::Checkpoint.count }.by_at_least(5) end - it 'creates checkpoints with valid attributes', - quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/560512' do + it 'creates checkpoints with valid attributes' do run_rake_task('gitlab:duo_workflow:populate', '3', '1') checkpoint = Ai::DuoWorkflows::Checkpoint.last @@ -119,8 +118,7 @@ ) end - context 'when checkpoint creation based on workflow status', - quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/560512' do + context 'when checkpoint creation based on workflow status' do it 'creates checkpoints with correct status progression for different workflow states' do run_rake_task('gitlab:duo_workflow:populate', '10', '5') @@ -157,8 +155,7 @@ end end - it 'creates checkpoints with valid UI chat log entries', - quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/560512' do + it 'creates checkpoints with valid UI chat log entries' do run_rake_task('gitlab:duo_workflow:populate', '2', '1') checkpoint = Ai::DuoWorkflows::Checkpoint.last @@ -177,8 +174,7 @@ expect(ui_chat_log[6]['message_type']).to eq('workflow_end') end - it 'creates checkpoints with workflow goal referenced in chat log', - quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/560512' do + it 'creates checkpoints with workflow goal referenced in chat log' do run_rake_task('gitlab:duo_workflow:populate', '1', '1') workflow = Ai::DuoWorkflows::Workflow.last @@ -191,8 +187,7 @@ end end - it 'uses default values when no arguments provided', - quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/560512' do + it 'uses default values when no arguments provided' do expect { run_rake_task('gitlab:duo_workflow:populate') } .to change { Ai::DuoWorkflows::Workflow.count }.by(50) .and change { Ai::DuoWorkflows::Checkpoint.count }.by_at_least(50)