Bug 14308

Summary: Documentation links unavailable for 3.2.2 and 3.1.6
Product: [Documentation] General Docs Reporter: Michael Opdenacker <michael.opdenacker>
Component: docs-generalAssignee: Michael Opdenacker <michael.opdenacker>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: Medium+ CC: michael.opdenacker, ndec13, randy.macleod, richard.purdie
Version: unspecified   
Target Milestone: 3.1.7   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Michael Opdenacker 2021-03-19 13:38:24 UTC
Hello,

linkchecker (http://wummel.github.io/linkchecker) reports two important broken links from https://docs.yoctoproject.org/releases.html:

https://docs.yoctoproject.org/3.1.6
https://docs.yoctoproject.org/3.2.2

There's nothing wrong in the URLs, as the URLs for the previous versions follow the same pattern and are working.

I guess it's an issue in the way the docs are generated for publication on the website. I don't know yet where the script in charge is.

Don't hesitate to re-assign to the culprit if needed.

Michael.
Comment 1 Nicolas Dechesne 2021-03-22 17:49:49 UTC
right.. this is something we haven't discussed yet ;) 

docs.yoctoproject.org is populated with scripts/run-docs-build in this repo:

http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder-helper/log/scripts/run-docs-build

it's executed on the yocto auto builder, whenever there is a 'doc' change. How we detect doc changes is here:
http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder2/tree/schedulers.py#n355

if you look at run-docs-build, Richard added the generation of 3.1.5, 3.2 and 3.2.1.. that explains why 3.1.6 and 3.2.2 are missing. So it's straight forward to add them, however... we need to find a better way...

we've discussed a few times about a global config file for docs, i need to check if that was discussed in a bugzilla.. but the idea would be to list all doc branches/releases (e.g. in YAML) and have the release engineer update that for every new release. With the old website, we were using this:
http://api-v1.yoctoproject.org/documentation-api

which was used by the website to display (or not) docs on the documentation webpage. We need to put (back) something similar for Sphinx, and update run-docs-build to use it.. 

well, we should fix the problem in the short term and publish the missing docs right away.. and start a new bug to fix it properly..
Comment 2 Randy MacLeod 2021-03-25 14:35:43 UTC
Please send a patch or ask Richard Purdie for help.
Comment 3 Michael Opdenacker 2021-03-25 16:46:25 UTC
Hi Nicolas

Thanks for all the details.
I agree with should fix this now and open a new bug to fix this properly.

Let's continue the discussion in this new bug report.
I have an idea to propose.

I'll send a patch right away, so that the missing docs are generated and we can close this bug so that we don't increase the number of bugs in the universe ;)

Thanks
Michael.
Comment 4 Nicolas Dechesne 2021-03-25 16:50:43 UTC
ah ok.. 

meanwhile.. i was just typing this..

-cd $ypdocs
-git checkout gatesgarth
-make clean
-make publish
-mkdir $outputdir/gatesgarth
-cp -r ./_build/final/* $outputdir/gatesgarth
-
-cd $ypdocs
-git checkout dunfell
-make clean
-make publish
-mkdir $outputdir/dunfell
-cp -r ./_build/final/* $outputdir/dunfell
-
-cd $ypdocs
-git checkout yocto-3.2.1
-make clean
-make publish
-mkdir $outputdir/3.2.1
-cp -r ./_build/final/* $outputdir/3.2.1
-
-cd $ypdocs
-git checkout yocto-3.2
-make clean
-make publish
-mkdir $outputdir/3.2
-cp -r ./_build/final/* $outputdir/3.2
-
-cd $ypdocs
-git checkout yocto-3.1.5
-make clean
-make publish
-mkdir $outputdir/3.1.5
-cp -r ./_build/final/* $outputdir/3.1.5
+# release/stable branches
+for branch in dunfell gatesgarth; do
+    cd $ypdocs
+    git checkout $branch
+    make clean
+    make publish
+    mkdir $outputdir/$branch
+    cp -r ./_build/final/* $outputdir/$branch
+done
+
+# Yocto Project releases
+for tag in 3.2 3.2.1 3.1.5; do
+    cd $ypdocs
+    git checkout yocto-$tag
+    make clean
+    make publish
+    mkdir $outputdir/release/$tag
+    cp -r ./_build/final/* $outputdir/release/$tag
+done
 
if your idea is better, i will stop typing ;)
Comment 5 Michael Opdenacker 2021-03-25 17:32:59 UTC
Hi Nico,

This sounds like a good and elegant solution to fix the current issue.

I was thinking about your idea to create a list of releases to feed to run-docs-build. We could also use it to create the yocto-docs/documentation/releases.rst file too.

That's what I was going to propose for the new bug to create.

So, you can go ahead and send the patch to fix this issue.

Thanks!
Comment 6 Nicolas Dechesne 2021-03-26 09:50:51 UTC
RP merged the patches, and 3.1.6 and 3.2.2 are now published.
Comment 7 Michael Opdenacker 2021-03-26 09:55:09 UTC
Indeed! Thanks!
As the person reporting the issue, I am closing this bug.
Let me know if someone else was supposed to do this...