davosmith / moodle-checklist

Checklist plugin for Moodle - allows a teacher to create a checklist for their students to tick-off
GNU General Public License v3.0
24 stars 68 forks source link

XMLDB file needs reconciling #91

Closed ewallah closed 2 years ago

ewallah commented 2 years ago

The lastest Moodle version checks all db/install.xml files. When running Behat tests, an error is thrown with this output:

This functionality looks though the contents of all XMLDB files to verify that they match the results of generating them from the XMLDB editor. A list of files needing to be reconciled (regenerated) will be displayed and the XMLDB editor can be used to fix them.

Search results
Found files to reconcile: 1
mod/checklist/db/install.xml
davosmith commented 2 years ago

This must be a very recent change to Moodle, as this didn't happen when I last ran the Behat tests a couple of weeks ago.

Thanks for reporting, but if this is an issue, it will get picked up when I run the automated tests in preparation for the Moodle 4.0 release.

scara commented 2 years ago

Hi @davosmith, that Behat test come from MDL-73764 and you can find a trick there too: https://github.com/moodle/moodle/blob/d24a4ab56fe595bb1dd7b0af599e576440e0b68a/admin/tool/xmldb/actions/reconcile_files/reconcile_files.class.php#L97-L100 .

HTH, Matteo

davosmith commented 2 years ago

Just a note - I've re-run the CI tests (including all behat tests) for mod_checklist and confirmed that there are no errors (other than an unrelated issue with Javascript needing to be re-compiled).

I'm not sure what is producing this error on your system, but it doesn't appear to be related to the checklist activity.

ewallah commented 2 years ago

Another note - I can reproduce this error in GitHub Actions:

Other plugins do NOT have this error: MOODLE_3_11_STABLE: OK

But the easiest method to check is visiting the page admin/tool/xmldb/index.php?action=reconcile_files in MOODLE_3_11_STABLE or master.

davosmith commented 2 years ago

I have a github actions run for mod_checklist this morning here: https://github.com/davosmith/moodle-checklist/runs/5356883235?check_suite_focus=true

The only issue it has, that I can see, is the Javascript compiling has been changed between M3.11 and M4.0, so I'll need to split it out into a different version to stop it complaining in one or the other.

There is absolutely no complaints about the install.xml file there - so I'm not really clear where you are having behat problems? Maybe worth checking your behat process?

I have confirmed that the XMLDB editor can show the file as "needing reconciling", but as the only difference when I checked it was the newline character at the end of the file, this would appear to a bug in the checking system, rather than a legitimate XML file problem that needs fixing.