Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76310

Enrol LTI upgrade of consumer secrets fails on Oracle

XMLWordPrintable

    • Oracle
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • Hide

      Ensure testing on Oracle

      master

      1. Checkout the following commit (the one immediately before MDL-76113 was integrated):

        $ git checkout 1b9ebba57bf8736194b46348be4a241da2130675~1
        

      2. Install site
      3. Checkout the master branch containing the fix (this issue)
      4. Perform upgrade
      5. Confirm upgrade completes

      400

      1. Checkout the following commit (the one immediately before MDL-76113 was integrated):

        $ git checkout d7b4dd9a6a41d2452b06ad75d48c1e18de6c5cb3~1
        

      2. Install site
      3. Checkout the 400 branch containing the fix (this issue)
      4. Perform upgrade
      5. Confirm upgrade completes

      311

      1. Checkout the following commit (the one immediately before MDL-76113 was integrated):

        $ git checkout 28f06c0f27f2911935ce0a64a0d6060339a936d9~1
        

      2. Install site
      3. Checkout the 311 branch containing the fix (this issue)
      4. Perform upgrade
      5. Confirm upgrade completes
      Show
      Ensure testing on Oracle master Checkout the following commit (the one immediately before MDL-76113 was integrated): $ git checkout 1b9ebba57bf8736194b46348be4a241da2130675~1 Install site Checkout the master branch containing the fix (this issue) Perform upgrade Confirm upgrade completes 400 Checkout the following commit (the one immediately before MDL-76113 was integrated): $ git checkout d7b4dd9a6a41d2452b06ad75d48c1e18de6c5cb3~1 Install site Checkout the 400 branch containing the fix (this issue) Perform upgrade Confirm upgrade completes 311 Checkout the following commit (the one immediately before MDL-76113 was integrated): $ git checkout 28f06c0f27f2911935ce0a64a0d6060339a936d9~1 Install site Checkout the 311 branch containing the fix (this issue) Perform upgrade Confirm upgrade completes

      Caught during QA cycle, and reported at MDLQA-16982

      enrol_lti
       
      Error reading from database
       
      More information about this error
      Debug info: ORA-00932: inconsistent datatypes: expected - got CLOB
      SELECT lu.id, lc.secret
      FROM m_enrol_lti_users lu
      JOIN m_enrol_lti_lti2_consumer lc
      ON (lu.consumerkey = lc.consumerkey256)
      WHERE lc.ltiversion = :o_ltiversion
      AND lu.consumersecret != lc.secret
      AND lu.lastaccess IS NOT NULL
      [array (
      'o_ltiversion' => 'LTI-2p0',
      )]
      Error code: dmlreadexception
      Stack trace:
       
          line 494 of /lib/dml/moodle_database.php: dml_read_exception thrown
          line 277 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
          line 1134 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
          line 476 of /enrol/lti/db/upgrade.php: call to oci_native_moodle_database->get_recordset_sql()
          line 784 of /lib/upgradelib.php: call to xmldb_enrol_lti_upgrade()
          line 1952 of /lib/upgradelib.php: call to upgrade_plugins()
          line 721 of /admin/index.php: call to upgrade_noncore()
      

      Appears to be a regression from MDL-76113 (the step from MDL-76170 also looks like it'll fail on the same text lu.consumer[key|secret] field comparisons):

      Debug info: ORA-00932: inconsistent datatypes: expected - got CLOB
      SELECT lu.id, lc.secret
      FROM m_enrol_lti_users lu
      JOIN m_enrol_lti_lti2_consumer lc
      ON (lu.consumerkey = lc.consumerkey256)
      WHERE lu.consumersecret IS NULL
      AND lu.lastaccess IS NOT NULL
      [array (
      )]
      Error code: dmlreadexception Stack trace:
       
          line 494 of /lib/dml/moodle_database.php: dml_read_exception thrown
          line 277 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
          line 1134 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
          line 497 of /enrol/lti/db/upgrade.php: call to oci_native_moodle_database->get_recordset_sql()
          line 784 of /lib/upgradelib.php: call to xmldb_enrol_lti_upgrade()
          line 1952 of /lib/upgradelib.php: call to upgrade_plugins()
          line 721 of /admin/index.php: call to upgrade_noncore()
      

            pholden Paul Holden
            pholden Paul Holden
            Jake Dallimore Jake Dallimore
            Jun Pataleta Jun Pataleta
            John Edward Pedregosa John Edward Pedregosa
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 50 minutes
                2h 50m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.