Moodle

Environment custom checks aren't backwards compatible

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.6, 1.9.2
  • Fix Version/s: 1.8.7, 1.9.3
  • Component/s: General
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

environment.xml can be downloaded at any time (from download.moodle.org that publish the HEAD version).

That introduces new checks (custom ones, relying in moodle libs) that cannot be there in older versions.

For example, the php_check_register_globals check, is under 1.9 and HEAD but not it 1.8. If, under 1.8 you try to check for 1.9 compatibility, it throws one error, because the Moodle code needed to perform that test isn't available in 1.8.

Behaviour should be to ignore checks that cannot be performed (because of missing lib of function).

Ciao

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Resolving as fixed.

Now, when custom checks are being executed... if they are against future releases... and the custom check (file or function) is missing... just skip the test. In the other hand, if test is for current release, enforce existing file and function.

This way environment.xml are 100% BC, so the HEAD one can run under 18_STABLE and 19_STABLE perfectly.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Resolving as fixed. Now, when custom checks are being executed... if they are against future releases... and the custom check (file or function) is missing... just skip the test. In the other hand, if test is for current release, enforce existing file and function. This way environment.xml are 100% BC, so the HEAD one can run under 18_STABLE and 19_STABLE perfectly. Ciao
Hide
Tim Hunt added a comment -

Eloy, I think it would be better to display the names of any tests that cannot be carried out, with an appropriate message an colour, instead of just showing nothing at all. I realise that that would be a bigger change, but I think it is worth doing.

Show
Tim Hunt added a comment - Eloy, I think it would be better to display the names of any tests that cannot be carried out, with an appropriate message an colour, instead of just showing nothing at all. I realise that that would be a bigger change, but I think it is worth doing.
Hide
Eloy Lafuente (stronk7) added a comment -

Hehe,

in fact that was my first idea. To show some sort of notice about that.

I agree developers should be able to view them (to complete-backport as many custom checks as possible).

But normal users... they will see something like "This test cannot be performed under Moodle 1.x"... and? Panic? :-/ What's the point about showing to normal users that those custom checks are missing?

So, perhaps we could enforce the tests always if running under debug (although I really thing developers don't use to run those env checks in old versions - the fact is that this was broken since ages). I just discovered it when synchronising the environment.xml file between all branches.

In the other side... I think we are in the "safe side" up to Moodle 2.0, mainly because 2.0 requires 1.9 and 1.9 has ALL the custom checks properly running. So perhaps we could make another task (2.0, 2.1...) about possible enhancements of the whole environmental stuff.

What do you think? Ciao

Show
Eloy Lafuente (stronk7) added a comment - Hehe, in fact that was my first idea. To show some sort of notice about that. I agree developers should be able to view them (to complete-backport as many custom checks as possible). But normal users... they will see something like "This test cannot be performed under Moodle 1.x"... and? Panic? :-/ What's the point about showing to normal users that those custom checks are missing? So, perhaps we could enforce the tests always if running under debug (although I really thing developers don't use to run those env checks in old versions - the fact is that this was broken since ages). I just discovered it when synchronising the environment.xml file between all branches. In the other side... I think we are in the "safe side" up to Moodle 2.0, mainly because 2.0 requires 1.9 and 1.9 has ALL the custom checks properly running. So perhaps we could make another task (2.0, 2.1...) about possible enhancements of the whole environmental stuff. What do you think? Ciao
Hide
Tim Hunt added a comment -

I understand your reasoning, but I am not sure whether you are right. Oh well, I guess this is good enough for now. I'll close this bug.

Show
Tim Hunt added a comment - I understand your reasoning, but I am not sure whether you are right. Oh well, I guess this is good enough for now. I'll close this bug.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: