-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mustache liniting: "WARNING: Problem calling HTML validator" #91
Comments
There is a known issue with travis and moodle-plugin-ci mustache, this avoids that issue. The plugin is reliant on java openjdk-8-jre, whereas xenial and bionic ship with higher versions. By default, java therefore refers to a higher version and mustache template linting fails. This patch is a workaround for that behaviour until the issue with the plugin is resolved. (See https://github.com/blackboard-open-source/moodle-plugin-ci/issues/91\)
There is a known issue with travis and moodle-plugin-ci mustache, this avoids that issue. The plugin is reliant on java openjdk-8-jre, whereas xenial and bionic ship with higher versions. By default, java therefore refers to a higher version and mustache template linting fails. This patch is a workaround for that behaviour until the issue with the plugin is resolved. (See https://github.com/blackboard-open-source/moodle-plugin-ci/issues/91\)
Thanks for researching this - just noticed it's failing for this project. |
Looks like the fix is to update our version of https://github.com/moodlehq/moodle-local_ci - any idea what we do with packages? addons:
apt:
packages:
- openjdk-8-jre-headless Looks like it was removed from the moodlehq project... that makes me a little nervous - should we at least pin it to java 11 or something? |
This should be fixed in master now. Still blocked on releasing due to Chrome/Behat problems. |
Correct, it has been fixed in https://tracker.moodle.org/browse/MDLSITE-5739 You don't need explicitly specify openjdk-8-jre-headless (or any other java package) if used with |
If your plugin ci test started reporting the error similar to:
for every mustache file in your plugin, you are in big trouble!
Haha, joking. Have a look at build system information at the top of Travis build log, it will be something like:
This mean that Travis started using Ubuntu Xenial on VM, and this is where the problem is coming from.
Before getting into more details, here is a quick fix. Unless there is a specific reason you need Xenial, just pin Travis to use Ubuntu Trusty instead (in fact if the problem came out of blue, check system information on last successful CI run, I bet Trusty was used there) by adding this line to your
.travis.yml
:OK, now more details on root cause. The issue is realated to version of
java
, validator used inmoodle-local-ci
and the way how validator output is handled inmoodle-local-ci
. Although, we requreopenjdk-8-jre-headless
package in .travis.yml, it apparently has no effect for Xenial, which comes withopenjdk10
andopenjdk11
installed. By defaultjava
there is referring to openjdk11:We know that mustache linting works fine with
openjdk8
. But there is no obvious way of swithingjava
version to 8 as part of build, asupdate-alternatives
does not seeopenjdk10
and 11 (they are not coming from apt packages):This has been acknowleged by travis already, and if you need to run Xenial with openjdk8 for some reason, you may try adding this hack to your
before_install
script (did not test).What is actually happening during linting is reported to
moodle-local-ci
maintainers (MDLSITE-5739).I am not sure if this requires a PR for now, or we can keep this ticket open for reference and discussion.
The text was updated successfully, but these errors were encountered: