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

Bugs affecting reliability of unoconv test function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.2
    • 3.1, 3.1.1
    • Files API
    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • MDL-55513-master
    • 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.

      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.

            tonybutler Tony Butler
            tonybutler Tony Butler
            Simey Lameze Simey Lameze
            Andrew Lyons Andrew Lyons
            Jun Pataleta Jun Pataleta
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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