Rerun fixups to backfill lti registrations and acc bindings

fixes INTEROP-8800

flag = none

test plan:
- the DataFixup classes being run here already have tests, this is
  just causing them to be run again in a migration
- see commit 47c1db for the actual change that is being run, and
  its test coverage

Change-Id: Ibae7b9f0c3c4d19c95be0aae3176b5007a47e0a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355619
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Hawkins <ryan.hawkins@instructure.com>
Migration-Review: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
This commit is contained in:
Tucker McKnight 2024-08-21 16:52:36 -06:00 committed by Tucker Mcknight
parent f6b6a260a3
commit 8c45def786
1 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,28 @@
# frozen_string_literal: true
#
# Copyright (C) 2024 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
class RerunBackfillLtiRegistrationsAndAccountBindings < ActiveRecord::Migration[7.1]
tag :postdeploy
def up
strand = "backfill_lti_registrations_and_account_bindings/shard_#{Shard.current.id}"
DataFixup::CreateLtiRegistrationsFromDeveloperKeys.delay_if_production(priority: Delayed::LOWER_PRIORITY, strand:).run
DataFixup::Lti::BackfillLtiRegistrationAccountBindings.delay_if_production(priority: Delayed::LOWER_PRIORITY, strand:).run
end
end