You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/05/21 09:45:22 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request #10668: Fix website build failure caused by python doc generate script

BewareMyPower opened a new pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668


   ### 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 https://github.com/apache/pulsar/issues/9682. https://github.com/apache/pulsar/pull/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`.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668#issuecomment-845855367


   I just built it in my local env. I'm not sure if it's a failure
   
   ```
   warning highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest
   [2/4] Fetching packages...
   info fsevents@1.2.13: The platform "linux" is incompatible with this module.
   info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
   error @redocly/openapi-core@1.0.0-beta.46: The engine "node" is incompatible with this module. Expected version ">=12.0.0". Got "10.24.0"
   error Found incompatible module.
   info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
   ```


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668#issuecomment-845866294


   @eolivelli 
   
   ![image](https://user-images.githubusercontent.com/18204803/119126131-3b0b6d80-ba65-11eb-8b8a-017efadc5ee7.png)
   
   ![image](https://user-images.githubusercontent.com/18204803/119126382-8d4c8e80-ba65-11eb-97a2-002235ea2684.png)
   
   ![image](https://user-images.githubusercontent.com/18204803/119126436-9d646e00-ba65-11eb-88fb-1dab2f51cbf1.png)
   
   ![image](https://user-images.githubusercontent.com/18204803/119126213-51b1c480-ba65-11eb-982e-791ab94c669b.png)
   
   ![image](https://user-images.githubusercontent.com/18204803/119126298-7148ed00-ba65-11eb-91f1-1ed8537da684.png)
   
   ![image](https://user-images.githubusercontent.com/18204803/119126516-b10fd480-ba65-11eb-8591-91918997d973.png)
   
   As for 2.8.0-SNAPSHOT URLs, they're the same with those URLs without 2.8.0-SNAPSHOT.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668#issuecomment-845850971


   > The change makes sense to me
   > 
   > but if I run the script locally I see this error:
   > 
   > ```
   > tools/docker-build-site.sh 
   > 
   > .....
   > + cp -r /pulsar/target/doxygen/html /pulsar/generated-site/api/cpp/
   > + mv /pulsar/target/doxygen/html /pulsar/generated-site/api/cpp/2.8.0-SNAPSHOT
   > mv: cannot move '/pulsar/target/doxygen/html' to '/pulsar/generated-site/api/cpp/2.8.0-SNAPSHOT/html': File exists
   > ```
   
   I think you have built the website before? I think you need to remove the local directory first.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668#issuecomment-845862068


   @BewareMyPower does the website renders correctly on your machine ?
   I mean, if you try to see it with a browser


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower edited a comment on pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
BewareMyPower edited a comment on pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668#issuecomment-845855367


   I just built it in my local env. I'm not sure if it's a failure
   
   ```
   warning highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest
   [2/4] Fetching packages...
   info fsevents@1.2.13: The platform "linux" is incompatible with this module.
   info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
   error @redocly/openapi-core@1.0.0-beta.46: The engine "node" is incompatible with this module. Expected version ">=12.0.0". Got "10.24.0"
   error Found incompatible module.
   info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
   ```
   
   Anyway all `index.html`s have been generated:
   
   ```
   $ ls generated-site/api/
   admin            client           cpp              pulsar-broker    pulsar-functions python
   $ find generated-site/api -name "index.html"
   generated-site/api/pulsar-broker/2.8.0-SNAPSHOT/index.html
   generated-site/api/python/index.html
   generated-site/api/python/schema/index.html
   generated-site/api/python/functions/index.html
   generated-site/api/python/2.8.0-SNAPSHOT/index.html
   generated-site/api/python/2.8.0-SNAPSHOT/schema/index.html
   generated-site/api/python/2.8.0-SNAPSHOT/functions/index.html
   generated-site/api/admin/2.8.0-SNAPSHOT/index.html
   generated-site/api/cpp/html/index.html
   generated-site/api/cpp/2.8.0-SNAPSHOT/index.html
   generated-site/api/pulsar-functions/2.8.0-SNAPSHOT/index.html
   generated-site/api/client/2.8.0-SNAPSHOT/index.html
   ```


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower edited a comment on pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
BewareMyPower edited a comment on pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668#issuecomment-845866294


   @eolivelli 
   
   ![image](https://user-images.githubusercontent.com/18204803/119126131-3b0b6d80-ba65-11eb-8b8a-017efadc5ee7.png)
   
   ![image](https://user-images.githubusercontent.com/18204803/119126382-8d4c8e80-ba65-11eb-97a2-002235ea2684.png)
   
   ![image](https://user-images.githubusercontent.com/18204803/119126436-9d646e00-ba65-11eb-88fb-1dab2f51cbf1.png)
   
   ![image](https://user-images.githubusercontent.com/18204803/119126213-51b1c480-ba65-11eb-982e-791ab94c669b.png)
   
   ![image](https://user-images.githubusercontent.com/18204803/119126298-7148ed00-ba65-11eb-91f1-1ed8537da684.png)
   
   ![image](https://user-images.githubusercontent.com/18204803/119126516-b10fd480-ba65-11eb-8591-91918997d973.png)
   
   As for 2.8.0-SNAPSHOT URLs, they're the same with those URLs without 2.8.0-SNAPSHOT.
   
   PS. `文件` is Chinese version of `file`.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui merged pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668#issuecomment-845853209


   Because the build script starts a docker container and maps the Pulsar project directory to `/pulsar` directory in container. So it will also create a `generated-site` directory. 
   
   I think it's a minor bug of the script that it uses `mkdir` to create directory but not `mkdir -p`. It's not a problem for CI but it could be annoyed when you test the script in local env.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668#discussion_r636798734



##########
File path: site2/tools/docker-build-site.sh
##########
@@ -27,7 +27,7 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
 cd $ROOT_DIR/pulsar-client-cpp
 
 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}"

Review comment:
       where and how do we build this image ?
   apachepulsar/pulsar-build:ubuntu-16.04-py2




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668#issuecomment-845848939


   The change makes sense to me
   
   but if I run the script locally I see this error:
   ```
   tools/docker-build-site.sh 
   
   .....
   + cp -r /pulsar/target/doxygen/html /pulsar/generated-site/api/cpp/
   + mv /pulsar/target/doxygen/html /pulsar/generated-site/api/cpp/2.8.0-SNAPSHOT
   mv: cannot move '/pulsar/target/doxygen/html' to '/pulsar/generated-site/api/cpp/2.8.0-SNAPSHOT/html': File exists
   ```
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668#issuecomment-845938953


   great


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on a change in pull request #10668: Fix website build failure caused by python doc generate script

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on a change in pull request #10668:
URL: https://github.com/apache/pulsar/pull/10668#discussion_r636814156



##########
File path: site2/tools/docker-build-site.sh
##########
@@ -27,7 +27,7 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
 cd $ROOT_DIR/pulsar-client-cpp
 
 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}"

Review comment:
       The image was uploaded manually by @merlimat before. The dockerfile is `build/docker/Dockerfile`.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org