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

Bugs affecting reliability of unoconv test function

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1, 3.1.1
    • Fix Version/s: 3.1.2
    • Component/s: Files API
    • Labels:
    • Testing Instructions:
      Hide
      • Set up a unoconv listener on a separate server (instructions at https://docs.moodle.org/31/en/Installing_unoconv).
      • Configure the unoconv path to point to your local wrapper script.
      • Run the unoconv test in the admin menu.
      • Check (assuming the converted test PDF is successfully created) that the test reports success.
      • Check that any subdirectories/files created in the temp directory are deleted after the test.
      • Stop your unoconv service and run the test again.
      • Check that the test now fails.
      • Check that the temp files are again deleted after the failed test.
      Show
      Set up a unoconv listener on a separate server (instructions at https://docs.moodle.org/31/en/Installing_unoconv ). Configure the unoconv path to point to your local wrapper script. Run the unoconv test in the admin menu. Check (assuming the converted test PDF is successfully created) that the test reports success. Check that any subdirectories/files created in the temp directory are deleted after the test. Stop your unoconv service and run the test again. Check that the test now fails. Check that the temp files are again deleted after the failed test.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-55513-master

      Description

      We have a Debian infrastructure with multiple web servers and a dedicated cron server where we are running unoconv as a service. The unoconv test in the admin menu failed consistently, which eventually turned out to be due to the file_exists() call in create_converted_document() returning false when the converted file had actually been created successfully. We worked out that 'touching' the file (and then checking its size rather than its existence) gives a much more reliable result in our case, although I can't offer an explanation as to why this is. However, this may conceivably be the case for some other people's setups too.

      Whilst debugging this we also found a couple of other bugs, including one which results in the test file only needing to be successfully created once. After this Moodle just accesses the stored file and reports success every time (which makes debugging fun ). (Fixed in MDL-54647).

      Another bug just results in the temp directory never being cleaned up after the testing process completes.

      I've attached a patch containing a commit for each fix.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Sep/16