The social plugin of mkdocs (defined inside the mkdocs.yml) downloads google fonts on the fly when building the documentation.
The issue can only be reproduced if you delete your local .cache folder inside the ankaios repository because the social plugin would cache and safe some files there. So, if you have an older .cache content including the roboto font from the last weeks, then the build would still work. To simulate CI / CD pipeline behavior make sure to delete the folder before building the doc.
It fails with a "bad zip" error:
After analyzing the code, it seems when downloading the Roboto.zip (google font) in a programmatic way (curl, the python code itself from the plugin) the file content contains just some javascript but not the zip file content of the font. However, when downloading it via the browser manually on the google fonts page, it works and can be extracted as a zip file.
This is the code the plugin uses:
/usr/local/lib/python3.11/dist-packages/material/plugins/social/plugin.py
When inserting a print to output the "name" argument it outputs "Roboto" as the font and downloads it.
When inserting the few lines of code into a python interpreter session the file does indeed contain not a valid zip content.
However, it doesn't matter if it is a temporary failure on google serves or what else, we shall not rely on a google font external resource that can break builds.
Suggestions:
host the google font locally for building the docs if really a "cooler" font is needed
or what I recommend use a system font that does not require downloading a font at all (Sans serif, ....)
The social plugin of mkdocs (defined inside the mkdocs.yml) downloads google fonts on the fly when building the documentation.
The issue can only be reproduced if you delete your local
.cache
folder inside the ankaios repository because the social plugin would cache and safe some files there. So, if you have an older .cache content including the roboto font from the last weeks, then the build would still work. To simulate CI / CD pipeline behavior make sure to delete the folder before building the doc.It fails with a "bad zip" error:
After analyzing the code, it seems when downloading the Roboto.zip (google font) in a programmatic way (curl, the python code itself from the plugin) the file content contains just some javascript but not the zip file content of the font. However, when downloading it via the browser manually on the google fonts page, it works and can be extracted as a zip file.
This is the code the plugin uses: /usr/local/lib/python3.11/dist-packages/material/plugins/social/plugin.py
When inserting a print to output the "name" argument it outputs "Roboto" as the font and downloads it. When inserting the few lines of code into a python interpreter session the file does indeed contain not a valid zip content.
However, it doesn't matter if it is a temporary failure on google serves or what else, we shall not rely on a google font external resource that can break builds.
Suggestions:
I have opened a test PR with a simple change: https://github.com/eclipse-ankaios/ankaios/actions/runs/8469434225/job/23204768790?pr=221 (the pipeline has failed with "bad zip" error.
If we comment out social plugin it builds successfully.
Current Behavior
The Documentation build fails because of google font download issue. See test PR: #221
Expected Behavior
The Documentation shall build successfully.
Context (Environment)
Github Actions Local builds within the devcontainer
Final result
To be filled by the one closing the issue.