Skip to content

Update dependecies #5595

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

Open
wants to merge 7 commits into
base: rolling
Choose a base branch
from

Conversation

Nils-ChristianIseke
Copy link
Contributor

@Nils-ChristianIseke Nils-ChristianIseke commented May 9, 2025

Use noble for CI.

@Nils-ChristianIseke Nils-ChristianIseke marked this pull request as draft May 9, 2025 15:12
@Nils-ChristianIseke Nils-ChristianIseke mentioned this pull request May 9, 2025
4 tasks
RUN . /opt/ros2doc/bin/activate && pip3 install -r requirements.txt -c constraints.txt

RUN echo "source /opt/ros2doc/bin/activate" >> /home/$user/.bashrc
USER $user
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason that we use a non root user in the container? In the current setup we would need sudo rights for installing pip and apt requirements.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not exactly sure. I looked at the original PR that added it (#1038), and it wasn't discussed. It may be coming from an old Jenkins config, and, given that it's named rosindex, I'm guessing it's meant to preserve permissions/owner of the artifact (HTML) files in the mounted volume/directory. I would keep it as-is and use --user.

MarkupSafe==2.0.1
packaging==21.3
pbr==5.8.0
alabaster==0.7.16
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed dependencies to latest available versions because they are working with all tools. Or is there a specific reason to stick to the dep availible via apt?

@Nils-ChristianIseke Nils-ChristianIseke marked this pull request as ready for review May 10, 2025 12:58
@Nils-ChristianIseke
Copy link
Contributor Author

@christophebedard some open questions from my side. Happy if you could have a look?

@christophebedard christophebedard self-requested a review May 10, 2025 13:06
@christophebedard
Copy link
Member

I will take a look once I'm back from vacation on Tuesday-ish!

FROM ubuntu:jammy
FROM ubuntu:noble
Copy link
Contributor Author

@Nils-ChristianIseke Nils-ChristianIseke May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any plans using a deployed Docker image instead of the Dockerfile? I can create an issue for this if you think this is reasonable to do.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

Do you mean installing the dependencies into the image itself instead of installing them through CMD when the container actually gets used to build the docs? The way it currently works, the container will install the exact versions of dependencies as specified by the docs/repo being built basically at the same time as the docs are built. I think we should keep it as-is for now, but you can open a follow-up issue.

@@ -20,7 +20,8 @@ RUN apt-get update && \
graphviz \
locales \
make \
python3-pip && \
python3-pip \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to support uv , we could consider uv instead of pip (much faster, venv support, better dep. management). Can create an issue for this if wanted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer keeping pip. I don't think there's a big enough reason to move to another tool.

@christophebedard christophebedard self-assigned this May 22, 2025
Copy link
Member

@christophebedard christophebedard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. I have some comments and suggestions.

@@ -20,7 +20,8 @@ RUN apt-get update && \
graphviz \
locales \
make \
python3-pip && \
python3-pip \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer keeping pip. I don't think there's a big enough reason to move to another tool.

FROM ubuntu:jammy
FROM ubuntu:noble
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

Do you mean installing the dependencies into the image itself instead of installing them through CMD when the container actually gets used to build the docs? The way it currently works, the container will install the exact versions of dependencies as specified by the docs/repo being built basically at the same time as the docs are built. I think we should keep it as-is for now, but you can open a follow-up issue.

@@ -37,7 +37,7 @@ pip install -r requirements.txt -c constraints.txt

### Pinned versions

For development we currently use Jammy (Ubuntu 22.04) as our build platform.
For development we currently use Noble (Ubuntu 22.04) as our build platform.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For development we currently use Noble (Ubuntu 22.04) as our build platform.
For development we currently use Noble (Ubuntu 24.04) as our build platform.

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12.2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we simply specify '3.12' here and everywhere else? Ubuntu 22.04 had 3.10.6 and we used '3.10'. Ubuntu 24.04 has 3.12.3, so let's use '3.12'.

Comment on lines +113 to -119
# Google Analytics configuration
googleanalytics_id = 'G-EVD5Z6G6NH'
googleanalytics_enabled = True
# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme_options = {
'analytics_id': 'G-EVD5Z6G6NH',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering why this needed to be moved to googleanalytics_id and found the answer here: https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html#confval-analytics_id

analytics_id
...
Deprecated since version 3.0.0: The analytics_id option is deprecated, use the sphinxcontrib-googleanalytics extension instead.

Comment on lines 12 to +14
sphinxcontrib-mermaid
sphinx-tamer
sphinxcontrib-googleanalytics
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small ordering fix:

Suggested change
sphinxcontrib-mermaid
sphinx-tamer
sphinxcontrib-googleanalytics
sphinx-tamer
sphinxcontrib-googleanalytics
sphinxcontrib-mermaid

RUN . /opt/ros2doc/bin/activate && pip3 install -r requirements.txt -c constraints.txt

RUN echo "source /opt/ros2doc/bin/activate" >> /home/$user/.bashrc
USER $user
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not exactly sure. I looked at the original PR that added it (#1038), and it wasn't discussed. It may be coming from an old Jenkins config, and, given that it's named rosindex, I'm guessing it's meant to preserve permissions/owner of the artifact (HTML) files in the mounted volume/directory. I would keep it as-is and use --user.

@@ -1,11 +1,11 @@
{
"name": "ROS 2 Documentation",
"build": {
"dockerfile": "../docker/image/Dockerfile"
"dockerfile": "../docker/image/Dockerfile",
"context": ".."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The context isn't needed (but the postCreateCommand is) if we keep CMD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants