Aman-Mittal opened a new pull request, #66:
URL: https://github.com/apache/fineract-site/pull/66

   Fixes broken diagrams published in #64, for example at 
https://fineract.apache.org/docs/stable/#_release_process, where the release 
process diagram shows "Cannot find Graphviz".
   
   ## Cause
   
   The pages in #64 were built on a machine without Graphviz (`dot`). 
`./gradlew asciidoctor` still reports success, but PlantUML draws an error 
image in place of every diagram that needs Graphviz. Each page had 8 of them: 7 
SVGs (the command-processing architecture diagrams, `m_wc_loan`, and the 
release process) and 1 PNG (the batch-jobs fault-tolerance diagram).
   
   ## Changes
   
   **`rebuild /docs/1.16.0 and /docs/1.17.0-SNAPSHOT with Graphviz`**
   - Both pages are rebuilt from the same backend commits as #64: the `1.16.0` 
tag (apache/fineract@6da8a989b398cb46537e91d8fe8769655ea1810d) and `develop` at 
apache/fineract@f1723d724ec017a54c622c62c6e80607b7fad034.
   - The diff is only those 8 diagrams and the two build-timestamp lines on 
each page.
   
   **`fail the site build on diagrams rendered as PlantUML errors`**
   - `scripts/check_doc_diagrams.py` decodes every diagram embedded in 
`docs/*/index.html` and fails on PlantUML error images. It finds SVGs by their 
error text. PlantUML PNGs carry the same metadata whether or not they rendered, 
so it finds those by the `#33FF02` green that PlantUML draws its error text in. 
Only PNGs that PlantUML tagged are decoded, so the check takes well under a 
second.
   - The check runs as part of `fineract-site build`, so `site-pr-check.yml` 
runs it on every PR.
   - `fineract-site docs` now refuses to copy a page with broken diagrams.
   - `fineract-site docs` gains `--replace-release` for republishing a released 
version from its tag, which is how 1.16.0 was replaced here. Without the flag, 
overwriting a release is still refused.
   - The README lists Graphviz and the Vega CLI tools as prerequisites for 
building the docs.
   
   ## Known exception: 1.13.0
   
   The new check also found the same broken batch-jobs PNG in `docs/1.13.0`, 
published that way in October 2025. Since 1.13.0 is EOL, it's recorded in 
`KNOWN_BROKEN` with its exact count (1) rather than rebuilt. A different count 
fails, and so does a fix that leaves the entry in place. If we'd rather fix it, 
the diagram's PlantUML source is embedded in the PNG, so that one image could 
be re-rendered.
   
   ## Testing
   
   - Against the docs currently on `asf-site`, the check fails with 16 broken 
diagrams (8 each in 1.16.0 and 1.17.0-SNAPSHOT). With this branch it passes.
   - `fineract-site build`: the internal link check, the docs diagram check and 
the Whimsy checks pass.
   - `fineract-site test`: the existing Ruby suite and 13 new Python tests 
pass. The tests use the broken and rebuilt batch-jobs PNGs from `docs/1.16.0` 
as fixtures, and cover every PNG row-filter type, with and without an alpha 
channel.
   
   ## Follow-up
   
   #65 (draft, the docs-sync workflow) will be rebased on this. It also needs 
to install Graphviz and to fail early when `dot` is missing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to