Closed Bug 961755 Opened 11 years ago Closed 11 years ago

Make API docs build again on website

Categories

(Bugzilla :: Documentation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: gerv, Assigned: gerv)

References

Details

Attachments

(2 files, 4 obsolete files)

Since we moved to RST, the website's build-docs.pl has been failing (I assume) and the docs links are 404. I fixed most of them to point to ReadTheDocs in bug 960967, but RTD doesn't build the API docs. To get them working again in the short term, we need to: 1) Make the new docs/makedocs.pl have an "API-only" switch 2) Update the website's build-docs.pl to use it when it detects an "docs/en/rst" directory. Gerv
Attached patch Patch v.1 (obsolete) — Splinter Review
Includes one-line patch for bug 960968, to avoid a tedious need to un-bitrot it. Gerv
Assignee: documentation → gerv
Status: NEW → ASSIGNED
Attachment #8362559 - Flags: review?(glob)
Attached patch Patch v.2Splinter Review
This is better. Gerv
Attachment #8362559 - Attachment is obsolete: true
Attachment #8362559 - Flags: review?(glob)
Attachment #8362561 - Flags: review?(dkl)
The attached patch deals with point 1 in comment 0. As the website pulls stuff from source control to build it, we need to get that checked in before it's at all easy to develop a patch for point 2. Gerv
Comment on attachment 8362561 [details] [diff] [review] Patch v.2 Looks good to me, although asking --pod-only and not having necessary Perl module makes the building "silently fail" or just not do anything but not sure if it's that big of a deal in the end. And the other one liner fixes our documentation+pdf Tinderbox build that has done the same as normal documentation build lately. :)
Attachment #8362561 - Flags: review?(dkl) → review+
Flags: approval?
Flags: approval? → approval+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified docs/makedocs.pl Committed revision 8874. Gerv
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Oops. Need to do part 2. Gerv
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch Patch B, v.1 (obsolete) — Splinter Review
And this should update the website build process to use the new switch. Gerv
Attachment #8362577 - Flags: review?(wicked)
Comment on attachment 8362577 [details] [diff] [review] Patch B, v.1 You don't seem to handle RST build for the CVS checkout so in effect you are not running it for trunk because according to default configuration, only 4.2 and 4.4 branches are built from bzr. Also, I can't see any code to rsync the resulting html/api output to be visible on the site. You probably need to share the code at the end of the current build_docs() sub with these subs or do the rst check inside the build_docs itself and "do the right thing" in there if found.
Attachment #8362577 - Flags: review?(wicked) → review-
(In reply to Teemu Mannermaa (:wicked) from comment #8) > Comment on attachment 8362577 [details] [diff] [review] > 961755b.diff > > You don't seem to handle RST build for the CVS checkout so in effect you are > not running it for trunk because according to default configuration, only > 4.2 and 4.4 branches are built from bzr. Good point. I also had a local change to build docs for trunk from BZR instead of CVS. That needs to be part of the patch. > Also, I can't see any code to rsync > the resulting html/api output to be visible on the site. Ah, right. That's what that code does! It's a mass of twisty variable names, all slightly different. Gerv
Attached patch Patch B, v.2 (obsolete) — Splinter Review
OK, try this. Gerv
Attachment #8362577 - Attachment is obsolete: true
Attachment #8362594 - Flags: review?(wicked)
Attachment #8362577 - Attachment description: 961755b.diff → Patch B, v.1
Comment on attachment 8362594 [details] [diff] [review] Patch B, v.2 This is much better and I like moving to bzr for trunk. Although, the build system probably need manual intervention to force the build or remove the trunk CVS checkout so that the script doesn't fail. Not sure if there's any code that should be added to handle that case (or if we should just ask justdave or somebody from Mozilla IT to do manual things). This change does break building the non-en languages but it seems that we haven't build any other languages for a long time anyway. Also this script is pretty much specific to our website. You are not copying the needed style.css to the dest and that's needed for the POD docs to look pretty, AFAIK. You probably should add the three lines doing the copy. It also fails creating new destination directories for a new version because mkdir can't handle missing intermediate directories, AFAIK. Simple fix would be to move the en to the rsync command line itself. This also helps building the $dest_dir for the style.css copy command.
Attachment #8362594 - Flags: review?(wicked) → review-
Status: REOPENED → ASSIGNED
(In reply to Teemu Mannermaa (:wicked) from comment #11) > This is much better and I like moving to bzr for trunk. Although, the build > system probably need manual intervention to force the build or remove the > trunk CVS checkout so that the script doesn't fail. Not sure if there's any > code that should be added to handle that case (or if we should just ask > justdave or somebody from Mozilla IT to do manual things). It might need manual intervention. justdave: who can do that? While you are on there, please install File::Which and File::Path, which are needed for LpSolit's recent patch to allow makedocs.pl to use rst2pdf in bug 961398. Gerv
Flags: needinfo?(justdave)
Attached patch Patch B, v.3 (obsolete) — Splinter Review
Attachment #8362594 - Attachment is obsolete: true
Attachment #8363202 - Flags: review?(wicked)
Attachment #8363202 - Flags: review?(wicked) → review+
justdave: I need to hear from you about removing the old CVS tip checkout on the server before I check this in. Once you tell me it's removed (or tell me who to ask to get it done) then I can check this in and the API docs will build again, and the link on the website will work. Don't forget to install File::Which and File::Path :-) Gerv
On RHEL6, File::Path is included in core Perl. File::Which is perl-File-Which and is available from both RHEL-Optional and rpmforge-extras. Bug 962726 filed to get webops to set this up.
Depends on: 962726
Flags: needinfo?(justdave)
Blocks: 806181
Attached patch Patch B, v.4Splinter Review
Webops has installed File::Which but not (AFAICS) removed the unwanted tip CVS checkout. Turns out the fix to do so is a one-line change, so I made it. See line 43 of build-docs.pl (line 22 of the new patch). The rest is identical to the reviewed version. Let's get these API docs back on the website :-) Gerv
Attachment #8363202 - Attachment is obsolete: true
Attachment #8365324 - Flags: review?(wicked)
Attachment #8365324 - Flags: review?(LpSolit)
Comment on attachment 8365324 [details] [diff] [review] Patch B, v.4 I know nothing about this script, so I will let wicked review it.
Attachment #8365324 - Flags: review?(LpSolit)
Attachment #8365324 - Flags: review?(wicked) → review+
Checking in bin/build-docs.pl; /www/bugzilla-org/bin/build-docs.pl,v <-- build-docs.pl new revision: 1.13; previous revision: 1.12 done Checking in etc/docs-versions; /www/bugzilla-org/etc/docs-versions,v <-- docs-versions new revision: 1.10; previous revision: 1.9 done So now we wait to see if it uploads to the website, if it works, and if the API docs appear again... Gerv
http://www.bugzilla.org/docs/tip/en/html/api/ is still 404 :-( Does anyone know how often the website updates from CVS, and how often the cron job builds the docs? justdave? Gerv
URL is now working again! \o/ Gerv
Status: ASSIGNED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Ha, oh well, so much for the patch I already had for this. :)
mcote: Did you have a patch to convert the API docs to reST in some way? That might still be of interest... Gerv
I do! Yeah I wasn't clear as to whether that was solved or not. Will work on adapting it to all the recent changes in the near future. I'll file a separate bug for it.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: