Skip to content

Conversation

jcarrano
Copy link
Contributor

@jcarrano jcarrano commented Aug 22, 2018

The previous doccheck would give a false negative when doxygen does not even run (because of misconfiguration). Guess what? Doxygen was never running on Travis! That means our docchecks in the static tests were a lie.

Issues/PRs references

For an example of why this is a problem, see #9818.

Depends on #10237 (if we enable the check before fixing travis then everything will fail,)
Depends on #10251 (the old version of Doxygen currently in travis reports a lot of errors).

@jcarrano jcarrano requested a review from jia200x August 22, 2018 13:54
@jia200x
Copy link
Member

jia200x commented Aug 22, 2018

that was fast :)

I'm currently trying the script

@@ -10,6 +10,11 @@

RIOTBASE="$(cd $(dirname $0)/../../..; pwd)"

die() {
echo "warning: Failed to build run doxygen"
Copy link
Member

@jia200x jia200x Aug 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these error messages can come from the Doxygen makefile. E.g there might be a "doxygen not found" or a "git-lfs not installed", they are 2 different errors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea of this PR was to catch any non-zero exit code from make doc. Maybe I can change the message to "make doc exited with non-zero code" to make it explicit.
Afterwards we could add filters to point at the cause of the problem.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good

@jia200x
Copy link
Member

jia200x commented Aug 22, 2018

besides the comment I just made, the script is running as expected. Great!

@jia200x
Copy link
Member

jia200x commented Aug 22, 2018

(Travis fails, the error seems to be triggered there)

@jcarrano
Copy link
Contributor Author

jcarrano commented Aug 22, 2018

(Travis fails, the error seems to be triggered there)

Weird. It works on my machine. Could it be that make doc was failing (in travis) all this time and we never detected it?

@jia200x
Copy link
Member

jia200x commented Aug 22, 2018

Weird. It works on my machine. Could it be that make doc was failing (in travis) all this time and we never detected it?

If I remember correctly I have seen Doxygen errors, not sure where (Travis CI or Murdock) . I will try the Docker image to see if it works.

@aabadie
Copy link
Contributor

aabadie commented Aug 22, 2018

Could it be that make doc was failing (in travis) all this time

I already noticed related problems in previous PRs where Murdock was reporting doxygen errors (undocumented paramaters, etc) but not Travis. I thought that doxygen version was the culprit and didn't look at that too much.

@jcarrano jcarrano added Area: tools Area: Supplementary tools Area: doc Area: Documentation Area: CI Area: Continuous Integration of RIOT components labels Aug 24, 2018
@jia200x jia200x added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Aug 28, 2018
@jcarrano jcarrano force-pushed the doccheck-report-total-failure branch from 5b3f873 to 96e9927 Compare September 18, 2018 12:32
@jcarrano
Copy link
Contributor Author

@jia200x Is this PR still relevant or has it been solved in another one?

@jia200x
Copy link
Member

jia200x commented Oct 18, 2018

AFAIK the issue is still present

@jcarrano jcarrano force-pushed the doccheck-report-total-failure branch 2 times, most recently from e564137 to a37c56e Compare October 24, 2018 12:30
@jcarrano jcarrano added the State: waiting for other PR State: The PR requires another PR to be merged first label Oct 24, 2018
@jcarrano
Copy link
Contributor Author

Update: the problem was Travis and it's outdated lesscpy command. I did another PR to fix it.

@aabadie
Copy link
Contributor

aabadie commented Oct 24, 2018

How about moving travis configuration to xenial (instead of trusty) ?

@cladmi
Copy link
Contributor

cladmi commented Oct 24, 2018

@aabadie why not updating it directly to the new bionic docker image after the release when we use it in murdock ?

@aabadie
Copy link
Contributor

aabadie commented Oct 24, 2018

why not updating it directly to the new bionic docker image after the release when we use it in murdock ?

Easy, have a look at #8729. But it requires to move to CircleCI => which provides a nice container environment.

@jcarrano
Copy link
Contributor Author

jcarrano commented Oct 24, 2018

Can we first update and then move to CircleCI? I'm sure it won't be without inconveniences. Then we would have the problems that come from updating ubuntu and changing CI all at the same time.

@cladmi
Copy link
Contributor

cladmi commented Oct 24, 2018

Can we not use our image in travis ?

But sure using the latest version on travis would be better anyway. What is missing to go for it ?

@aabadie
Copy link
Contributor

aabadie commented Oct 24, 2018

Can we not use our image in travis ?

Apparently yes, see https://docs.travis-ci.com/user/docker/
But I find it less handy than the circle ci config. Note that on CircleCI there's the possibility to store builds artifacts and this is what is used to have an overview of the generated doc in #8729

@cladmi
Copy link
Contributor

cladmi commented Oct 24, 2018

@aabadie It is still two different tasks, use travis with an updated image even if ugly and migrating should be justified by real benefits and could be a separate thing. Fix first, migrating is another step.

Now there is a real issue with travis with the doxygen version as shown in #10237

@jcarrano
Copy link
Contributor Author

jcarrano commented Oct 25, 2018

@cladmi

use travis with an updated image even

d'oh! It seems that is not possible. @aabadie is right, we need to move out of travis, see this:

travis-ci/travis-ci#9928

Travis is stuck with Trusty. Let them rot!!!!

EDIT: I provided a PR to use our own image in travis.

@jcarrano jcarrano force-pushed the doccheck-report-total-failure branch from db82f40 to d920c6e Compare October 25, 2018 11:56
@cladmi cladmi removed the State: waiting for other PR State: The PR requires another PR to be merged first label Nov 22, 2018
@cladmi
Copy link
Contributor

cladmi commented Nov 22, 2018

@jcarrano please rebase now that #10251 is merged.
You can also directly squash.

@jcarrano jcarrano force-pushed the doccheck-report-total-failure branch from d920c6e to ae4cecd Compare November 22, 2018 15:50
The previous doccheck would give a false negative when doxygen does
not even run (for example, because of misconfiguration).

Also, when doxygen fails to run, print the full output.
@jcarrano jcarrano added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 26, 2018
Copy link
Contributor

@cladmi cladmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested locally by adding a false in the make doc target.

Running make static-test correctly fails:

Running './dist/tools/doccheck/check.sh' x
Command output:

        'make doc' exited with non-zero code (2)
        make[1]: Entering directory '/home/harter/work/git/RIOT'
        "make" -BC doc/doxygen
        make[2]: Entering directory '/home/harter/work/git/RIOT/doc/doxygen'
        ( cat riot.doxyfile ; echo "GENERATE_HTML = yes" ) | doxygen -
        *make[2]: Leaving directory '/home/harter/work/git/RIOT/doc/doxygen'
        false
        Makefile:10: recipe for target 'doc' failed
        make[1]: *** [doc] Error 1
        make[1]: Leaving directory '/home/harter/work/git/RIOT'

When run with the same test commit in master, the error is not detected.

An invalid command in a doxygen message is also still detected

ERROR: Doxygen generates the following warnings:
core/include/assert.h:18: warning: Found unknown command `\auienras'

When you push force please put a message in the PR or we do not receive any notification about it.

@cladmi
Copy link
Contributor

cladmi commented Nov 28, 2018

@jia200x It's good for me, I let you have the final word.

@jcarrano
Copy link
Contributor Author

I tested locally by adding a false in the make doc target.

D'oh, I didn't realize I could do that. I was trying to force it to fail by inserting garbage into the doxyfile.

@jcarrano jcarrano dismissed jia200x’s stale review November 29, 2018 17:36

The issues were addressed (see comments)

@jcarrano jcarrano merged commit f4e810c into RIOT-OS:master Nov 29, 2018
@aabadie aabadie added this to the Release 2019.01 milestone Dec 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CI Area: Continuous Integration of RIOT components Area: doc Area: Documentation Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants