-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Fix website build failure caused by python doc generate script #10668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix website build failure caused by python doc generate script #10668
Conversation
tuteng
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am testing it locally.
thank you very much !
|
|
||
| BUILD_IMAGE_NAME="${BUILD_IMAGE_NAME:-apachepulsar/pulsar-build}" | ||
| BUILD_IMAGE_VERSION="${BUILD_IMAGE_VERSION:-ubuntu-16.04}" | ||
| BUILD_IMAGE_VERSION="${BUILD_IMAGE_VERSION:-ubuntu-16.04-py2}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where and how do we build this image ?
apachepulsar/pulsar-build:ubuntu-16.04-py2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The image was uploaded manually by @merlimat before. The dockerfile is build/docker/Dockerfile.
|
The change makes sense to me but if I run the script locally I see this error: |
I think you have built the website before? I think you need to remove the local directory first. |
|
Because the build script starts a docker container and maps the Pulsar project directory to I think it's a minor bug of the script that it uses |
|
I just built it in my local env. I'm not sure if it's a failure Anyway all |
|
@BewareMyPower does the website renders correctly on your machine ? |
|
As for 2.8.0-SNAPSHOT URLs, they're the same with those URLs without 2.8.0-SNAPSHOT. PS. |
|
great |
### Motivation The CI - Pulsar Website Build has been broken for a long time. Here's an example run: https://github.com/apache/pulsar/runs/2635024657?check_suite_focus=true ``` CMake Error at python/CMakeLists.txt:85 (MESSAGE): -- Using Boost Python libs: Could not find Boost Python library ``` It looks like to be the same issue with apache#9682. apache#9690 fixed the broken CI for cpp client but the `ci-pulsar-website-build.yaml` wasn't modified. Another issue is after I fixed the cpp build for website build, the `python-doc-gen.sh` still failed because the default `pdoc` is a Python3 tool ``` + pdoc pulsar --html --html-dir /pulsar/generated-site/api/python/2.8.0-SNAPSHOT Traceback (most recent call last): File "/usr/local/bin/pdoc", line 7, in <module> from pdoc.__main__ import cli File "/usr/local/lib/python3.5/dist-packages/pdoc/__init__.py", line 328 ) -> str: ^ ``` So we need to install a Python2 version `pdoc` as well. ### Modifications - Use `ubuntu-16.04-py2` tag instead of old `ubuntu-16.04` tag in `docker-build-site.sh` and force CMake to find Python2 in `python-doc-gen.sh`. The the Pulsar Python client library could be built successfully. - Install a Python2 version `pdoc` in `python-doc-gen.sh`.
### Motivation The CI - Pulsar Website Build has been broken for a long time. Here's an example run: https://github.com/apache/pulsar/runs/2635024657?check_suite_focus=true ``` CMake Error at python/CMakeLists.txt:85 (MESSAGE): -- Using Boost Python libs: Could not find Boost Python library ``` It looks like to be the same issue with apache#9682. apache#9690 fixed the broken CI for cpp client but the `ci-pulsar-website-build.yaml` wasn't modified. Another issue is after I fixed the cpp build for website build, the `python-doc-gen.sh` still failed because the default `pdoc` is a Python3 tool ``` + pdoc pulsar --html --html-dir /pulsar/generated-site/api/python/2.8.0-SNAPSHOT Traceback (most recent call last): File "/usr/local/bin/pdoc", line 7, in <module> from pdoc.__main__ import cli File "/usr/local/lib/python3.5/dist-packages/pdoc/__init__.py", line 328 ) -> str: ^ ``` So we need to install a Python2 version `pdoc` as well. ### Modifications - Use `ubuntu-16.04-py2` tag instead of old `ubuntu-16.04` tag in `docker-build-site.sh` and force CMake to find Python2 in `python-doc-gen.sh`. The the Pulsar Python client library could be built successfully. - Install a Python2 version `pdoc` in `python-doc-gen.sh`.






Motivation
The CI - Pulsar Website Build has been broken for a long time. Here's an example run: https://github.com/apache/pulsar/runs/2635024657?check_suite_focus=true
It looks like to be the same issue with #9682. #9690 fixed the broken CI for cpp client but the
ci-pulsar-website-build.yamlwasn't modified.Another issue is after I fixed the cpp build for website build, the
python-doc-gen.shstill failed because the defaultpdocis a Python3 toolSo we need to install a Python2 version
pdocas well.Modifications
ubuntu-16.04-py2tag instead of oldubuntu-16.04tag indocker-build-site.shand force CMake to find Python2 inpython-doc-gen.sh. The the Pulsar Python client library could be built successfully.pdocinpython-doc-gen.sh.Verifying this change
This change is a trivial rework / code cleanup without any test coverage.