One image for building the site and previewing components #65
Labels
No labels
effort
high
effort
low
effort
medium
good first issue
help wanted
meeting topic
needs changes
needs reporter feedback
needs review
needs vote
priority
high
priority
low
priority
medium
priority
on hold
type/content
type/misc
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
docs/site-builder#65
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Contributors preview a component with
docsbuilder.sh. It runsregistry.gitlab.com/fedora/docs/docs-website/docs-fp-o:latest, which nothing has rebuilt since September 2025. It builds the component with a reducedsite.ymlfrom the component repository, without the site's extensions, so the preview differs from the real site. It also cannot check links into other components, and this gets more important with docs/tickets#66. The site itself is built bybuild-scripts/rebuild-site.pyin a different image.Proposal
Use the builder image from site-builder (
build-scripts/) for everything, that is the site build in OpenShift and CI, and local previews. Publish it asquay.io/fedora-docs/builder, signed, and rebuild it every week (we can change the build schedule later). Add apreviewcommand torebuild-site.pywith two modes.--full) builds your component inside the whole site, so links into other components are checked. It takes about 20 to 35 seconds once the sources are cached. The first run takes several minutes.The preview would be started like this in the component repository:
It writes nothing into the repository and needs only Podman.
Measurements
A full English build takes about 14 minutes today. Antora itself needs 35 seconds of that, and the rest is downloading the sources. Downloading
council/docsalone took 9.5 minutes, because of a 243 MB PDF.Plan
Small pull requests in site-builder, each checked so that the site output stays the same:
rebuild-site.pyinto functions.Previews for pull requests can come later.
docsbuilder.shand docs-template stay unchanged for now.Questions for the team
podman machine)?docsbuilder.shbecome a small wrapper around it, or should it be retired?package.jsonandpackage-lock.jsonwere added in docs/docs-fp-o!25 to build the site with npm without containers. Should we keep, update or remove them?Related issues
docsbuilder.shpulls outdated images.build.shfails locally.docsbuilder.shon macOS.Assisted-by: Coding Agents and LLMs
Hey Hristo!
I like your idea very much. Here are my comments to your questions to the team:
Tested https://forge.stg.fedoraproject.org/docs/site-builder/src/branch/main/preview-container on macOS on an Apple silicon machine with the following findings:
preview-container/check-site.shneeds to be adjusted to be able to run on macOS (it assumes GNU sed for example).If we could set up the staging site to always use the latest version of Antora, and pin the production site to a specific version of Antora, that might be a useful way for us to catch early any upstream breaking changes introduced in Antora.
@hricky wrote in docs/docs-fp-o#65 (comment):
Yes, I think we should standardize on an open source, multi-platform tool. It seems sensible to me.
I think this only matters for local builds. As we know, at least a few people in the team work from Apple hardware, so it is reasonable that we need to find a way to make sure those folks can build and test docs sites locally. However, for the production deployment, I don't think it matters.
I think it is worthwhile to preserve a workflow where someone can quickly test their component locally. Whether it is with a script or something else, this is besides the point. I don't think we want to force someone to build the entire site if they don't want to.
I am not sure if I understand the technical ramifications of building the site with or without
npm. If we are using it, then we should probably be updating lockfiles and dependencies too.Newest Antora for staging. I like the idea, and it needs no change in infra/ansible. OpenShift builds the staging image from
build-scripts/Dockerfilein site-builder on forge.stg, and the production image from theprodbranch of docs-fp-o. So the two Dockerfiles can install different Antora versions. The CI workflow in site-builder also builds the image again on every run, at least four times a day, so it would show a breaking Antora change early. Today both Dockerfiles install@antora/cli@3.1, so every image build gets the newest 3.1 release. The newest Antora release is 3.2.1. I tested a build with Antora 3.2, andrebuild-site.pyfailed. This is not urgent, so I will look at it later. After that fix, staging can use the newest version while production stays pinned.npm files. The site build does not use the root
package.jsonandpackage-lock.json. The images install Antora with their ownnpm installcommand. The two files are only for someone who builds the site on their own computer with npm and without containers. If the preview needs only Podman, we do not need that. Nobody has updated the files since they were added in March. The lock file has Antora 3.1.14, but 3.1.15 came out in May. To use them, we would have to update them regularly. So I agree with Christian and would remove them. The pinned Antora version for production would go into the Dockerfile.For AArch64, I am still looking at the options for an AArch64 self-hosted runner. My test results and the plan for AArch64 images are in docs/docs-fp-o#66. For a quick preview of one component, the fast mode is the default and builds only that component, so nobody has to build the whole site. Christian suggested keeping
docsbuilder.shas a small wrapper around the new command. We can decide this after trying the command.@hricky wrote in docs/docs-fp-o#65 (comment):
Awesome! The fact that Antora 3.2 breaks our site today is exactly why this "canary in the coal mine" for staging will be handy.
@hricky wrote in docs/docs-fp-o#65 (comment):
I see. So, it only seems to matter for local development? In this case, I would tend to agree with deleting and
gitignore-ing them.@hricky wrote in docs/docs-fp-o#65 (comment):
Maybe you already know this, but if I recall correctly, the Fedora Forge Team can provide
aarch64runners but only for special purposes which actually requireaarch64. A quick look at the issue template for new runners seems to indicate that they can be requested.Not sure if that changes your interest in self-hosting an
aarch64runner or not.Also, I think @cstrauf could have a point about
docsbuilder.sh. For people who do not edit or work on Fedora Docs all the time, it might be convenient if we use the same wrapper script we have used for 8-9 years already. The people who do write docs might be trained on using this script. It could make migrating easier.Thanks for the link to the runner request template. It says that aarch64 runners are not generally available. Selecting aarch64 in the form only expresses interest, and the Forge team follows up on availability. The template also says that the runners on Fedora Forge are not intended for heavy CI workloads, and building the image on every run may count as heavy. This does not change my interest in self-hosting an AArch64 runner.
About
docsbuilder.sh, I also lean toward keeping it as a small wrapper around the new command. Then people can keep using the script they already know.I will remove the npm files and add them to
.gitignore.Discussed at the 2026-11-03 team meeting: https://discussion.fedoraproject.org/t/fedora-docs-team-meeting-2026-11-03/206179/2
Generally we all agreed with @jflory7's and @cstrauf's comments above.