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

mdeploy.php must not fail on its download_file() where $source url is a redirected url.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.5
    • 2.5
    • Administration
    • None
    • MOODLE_25_STABLE
    • MOODLE_25_STABLE
    • Hide

      0) open page https://moodle.org/plugins/pluginversions.php?plugin=mod_bigbluebuttonbn

      1) download manually and install a plugin from the plugins directory that is of a version that is compatible with yours but that isn't the latest version. (Here i used big blue button but had to set updateminmaturity setting to RC for the next step)

      2) got to plugins overview page and test that an update is available for bigbluebutton (to that lastest RC one, can be seen in the download versions tab for the plugin )

      3) continue to upgrade the plugin, test that <moodledata>/mdeploy/mdeploy.log does not report any errors in fetching the zip and upgrading the plugin.

      your log output should be similar to the following:

      2013-05-14 12:32:38 === MDEPLOY EXECUTION START ===
      2013-05-14 12:32:38 Successfully authorized using the passphrase file
      2013-05-14 12:32:38 Plugin upgrade requested
      2013-05-14 12:32:38 Downloading package https://download.moodle.org/download.php/direct/addons/2911/mod_bigbluebuttonbn_moodle25_2013050100.zip
      2013-05-14 12:32:38 Using custom CA certificate /Users/aparup/Sitesdata/p_data/master/mysql/moodleorgca.crt
      2013-05-14 12:32:42 Package downloaded into /Users/aparup/Sitesdata/p_data/master/mysql/mdeploy/var/4971bee4a727f6c31b348a997b06a13c.0.zip
      2013-05-14 12:32:42 MD5 checksum ok
      2013-05-14 12:32:42 Current plugin code location: /Users/aparup/Sites/p/mod/bigbluebuttonbn
      2013-05-14 12:32:42 Moving the current code into archive: /Users/aparup/Sitesdata/p_data/master/mysql/mdeploy/archive/bigbluebuttonbn_1368505962.0
      2013-05-14 12:32:42 Package successfully extracted
      

      Show
      0) open page https://moodle.org/plugins/pluginversions.php?plugin=mod_bigbluebuttonbn 1) download manually and install a plugin from the plugins directory that is of a version that is compatible with yours but that isn't the latest version. (Here i used big blue button but had to set updateminmaturity setting to RC for the next step) 2) got to plugins overview page and test that an update is available for bigbluebutton (to that lastest RC one, can be seen in the download versions tab for the plugin ) 3) continue to upgrade the plugin, test that <moodledata>/mdeploy/mdeploy.log does not report any errors in fetching the zip and upgrading the plugin. your log output should be similar to the following: 2013-05-14 12:32:38 === MDEPLOY EXECUTION START === 2013-05-14 12:32:38 Successfully authorized using the passphrase file 2013-05-14 12:32:38 Plugin upgrade requested 2013-05-14 12:32:38 Downloading package https://download.moodle.org/download.php/direct/addons/2911/mod_bigbluebuttonbn_moodle25_2013050100.zip 2013-05-14 12:32:38 Using custom CA certificate /Users/aparup/Sitesdata/p_data/master/mysql/moodleorgca.crt 2013-05-14 12:32:42 Package downloaded into /Users/aparup/Sitesdata/p_data/master/mysql/mdeploy/var/4971bee4a727f6c31b348a997b06a13c.0.zip 2013-05-14 12:32:42 MD5 checksum ok 2013-05-14 12:32:42 Current plugin code location: /Users/aparup/Sites/p/mod/bigbluebuttonbn 2013-05-14 12:32:42 Moving the current code into archive: /Users/aparup/Sitesdata/p_data/master/mysql/mdeploy/archive/bigbluebuttonbn_1368505962.0 2013-05-14 12:32:42 Package successfully extracted

      After implementing a download redirect by download.moodle.org to moodle.org/plugins we discovered that the mdeploy.php script broke...

      2013-05-14 11:35:17 === MDEPLOY EXECUTION START ===
      2013-05-14 11:35:17 Successfully authorized using the passphrase file
      2013-05-14 11:35:17 Plugin upgrade requested
      2013-05-14 11:35:17 Downloading package https://download.moodle.org/download.php/direct/addons/2911/mod_bigbluebuttonbn_moodle25_2013050100.zip
      2013-05-14 11:35:17 Using custom CA certificate /Users/aparup/Sitesdata/p_data/master/mysql/moodleorgca.crt
      2013-05-14 11:35:18 Curl remote error.
      2013-05-14 11:35:18 Array
      (
      [url] => https://download.moodle.org/download.php/direct/addons/2911/mod_bigbluebuttonbn_moodle25_2013050100.zip
      [content_type] => text/html; charset=UTF-8
      [http_code] => 302
      [header_size] => 720
      [request_size] => 133
      [filetime] => -1
      [ssl_verify_result] => 0
      [redirect_count] => 0
      [total_time] => 1.288314
      [namelookup_time] => 0.000633
      [connect_time] => 0.061531
      [pretransfer_time] => 0.228487
      [size_upload] => 0
      [size_download] => 0
      [speed_download] => 0
      [speed_upload] => 0
      [download_content_length] => -1
      [upload_content_length] => 0
      [starttransfer_time] => 1.288297
      [redirect_time] => 0
      [certinfo] => Array
      (
      )

      [primary_ip] => 141.101.113.179
      [primary_port] => 443
      [local_ip] => 192.168.100.135
      [local_port] => 64804
      [redirect_url] => https://moodle.org/plugins/download.php/2911/mod_bigbluebuttonbn_moodle25_2013050100.zip
      )
      2013-05-14 11:35:18 cURL error 0
      2013-05-14 11:35:18 Unable to download the file from https://download.moodle.org/download.php/direct/addons/2911/mod_bigbluebuttonbn_moodle25_2013050100.zip into /Users/aparup/Sitesdata/p_data/master/mysql/mdeploy/var/4971bee4a727f6c31b348a997b06a13c.18.zip
      2013-05-14 11:35:18 exception 'download_file_exception' with message 'Unable to download the package' in /Users/aparup/Sites/p/mdeploy.php:761
      Stack trace:
      #0 /Users/aparup/Sites/p/mdeploy.php(1499): worker->execute()
      #1

      {main}

      This is about simply following redirect (without using moodle library, but copying it, as mdeploy is separate)

      ps:As a sub-task or something else, i'm wondering that some alarm bells that should have gone off haven't wrt testing infrastructure.

            nebgor Aparup Banerjee
            nebgor Aparup Banerjee
            Damyon Wiese Damyon Wiese
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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