Skip to content

Fix docbuilding on release tag #40379

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

Merged
merged 12 commits into from
Aug 2, 2025

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Jul 6, 2025

After #39973, some necessary steps during the docbuild on release tags are no longer run (see https://github.com/sagemath/sage/actions/runs/16100707903/job/45429461356). Sorry - that was my fault. This is fixed here.

Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/job/46105684396

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@tobiasdiez tobiasdiez force-pushed the fix-docbuilding-release branch from cc5dfd4 to f59a6fd Compare July 7, 2025 10:35
@user202729
Copy link
Contributor

do try to open a pull request on your repository to see that the diff is correctly processed.

@tobiasdiez
Copy link
Contributor Author

tobiasdiez commented Jul 16, 2025

It randomly fails with

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/site-packages/sage/repl/ipython_kernel/__main__.py", line 4, in <module>
    IPKernelApp.launch_instance(kernel_class=SageKernel)
  File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/site-packages/traitlets/config/application.py", line 1074, in launch_instance
    app.initialize(argv)
  File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/site-packages/traitlets/config/application.py", line 118, in inner
    return method(app, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/site-packages/ipykernel/kernelapp.py", line 692, in initialize
    self.init_sockets()
  File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/site-packages/ipykernel/kernelapp.py", line 336, in init_sockets
    self.stdin_port = self._bind_socket(self.stdin_socket, self.stdin_port)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/site-packages/ipykernel/kernelapp.py", line 253, in _bind_socket
    return self._try_bind_socket(s, port)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/site-packages/ipykernel/kernelapp.py", line 229, in _try_bind_socket
    s.bind("tcp://%s:%i" % (self.ip, port))
  File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/site-packages/zmq/sugar/socket.py", line 320, in bind
    super().bind(addr)
  File "zmq/backend/cython/_zmq.py", line 998, in zmq.backend.cython._zmq.Socket.bind
    _check_rc(rc)
  File "zmq/backend/cython/_zmq.py", line 187, in zmq.backend.cython._zmq._check_rc
    raise ZMQError(errno)
zmq.error.ZMQError: Address already in use (addr='tcp://127.0.0.1:39085')
[rings_num] Extension error!
[rings_num] Versions
[rings_num] ========
[rings_num] * Platform:         linux; (Linux-6.11.0-1015-azure-x86_64-with-glibc2.39)
[rings_num] * Python version:   3.11.13 (CPython)
[rings_num] * Sphinx version:   8.2.3
[rings_num] * Docutils version: 0.21.2
[rings_num] * Jinja2 version:   3.1.6
[rings_num] * Pygments version: 2.19.2
[rings_num] Last Messages
[rings_num] =============
[rings_num]     sage/rings/real_mpfi
[rings_num]     sage/rings/real_mpfr
[rings_num] Loaded Extensions
[rings_num] =================
[rings_num] * sphinx.ext.mathjax (8.2.3)
[rings_num] * alabaster (1.0.0)
[rings_num] * sphinxcontrib.applehelp (2.0.0)
[rings_num] * sphinxcontrib.devhelp (2.0.0)
[rings_num] * sphinxcontrib.htmlhelp (2.1.0)
[rings_num] * sphinxcontrib.serializinghtml (1.1.10)
[rings_num] * sphinxcontrib.qthelp (2.0.0)
[rings_num] * sage_docbuild.ext.inventory_builder (unknown version)
[rings_num] * sage_docbuild.ext.multidocs (unknown version)
[rings_num] * sphinx.ext.autodoc.preserve_defaults (8.2.3)
[rings_num] * sphinx.ext.autodoc.type_comment (8.2.3)
[rings_num] * sphinx.ext.autodoc.typehints (8.2.3)
[rings_num] * sage_docbuild.ext.sage_autodoc (8.2.3)
[rings_num] * sphinx.ext.todo (8.2.3)
[rings_num] * sphinx.ext.extlinks (8.2.3)
[rings_num] * sphinx.ext.linkcode (8.2.3)
[rings_num] * sphinx_copybutton (0.5.2)
[rings_num] * sphinx_inline_tabs (2023.04.21)
[rings_num] * IPython.sphinxext.ipython_directive (unknown version)
[rings_num] * matplotlib.sphinxext.plot_directive (3.10.3)
[rings_num] * jupyter_sphinx (0.5.3)
[rings_num] Traceback
[rings_num] =========
[rings_num]       File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/site-packages/jupyter_sphinx/execute.py", line 294, in execute_cells
[rings_num]         raise ExtensionError("Notebook execution failed", orig_exc=e)
[rings_num]     sphinx.errors.ExtensionError: Notebook execution failed (exception: Kernel died before replying to kernel_info)
[rings_num] The full traceback has been saved in:
[rings_num] /tmp/sphinx-err-g4ve6eml.log
[rings_num] To report this error to the developers, please open an issue at <https://github.com/sphinx-doc/sphinx/issues/>. Thanks!
[rings_num] Please also report this if it was a user error, so that a better error message can be provided next time.
Exception ignored in atexit callback: <bound method run_sync.<locals>.wrapped of <nbclient.client.NotebookClient object at 0x7fcd3e18d690>>
Traceback (most recent call last):
  File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/site-packages/jupyter_core/utils/__init__.py", line 158, in wrapped
    return loop.run_until_complete(inner)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/sage-dev/lib/python3.11/site-packages/nbclient/client.py", line 504, in _async_cleanup_kernel
    assert self.km is not None
           ^^^^^^^^^^^^^^^^^^^
AssertionError: 

in the 'livedoc' building. I don't have time right now to investigate this further and thus temporarily disabled the live doc building.

https://github.com/tobiasdiez/sage/actions/runs/16137723269

@user202729
Copy link
Contributor

I guess if it works sometimes it's still better than it fails all of the time (?)

@tobiasdiez
Copy link
Contributor Author

I run it a couple of times, and it was always failing - but the "sub-docs" that triggered this error was always different.

@user202729
Copy link
Contributor

Address already in use

Maybe try disabling parallelism? (Better slow than broken?)

@tobiasdiez
Copy link
Contributor Author

Sure, that's a good approach to fix it. I don't have the time to work on this in the next two weeks (and this PR was meant more as quick hotfix), but will investigate it more afterwards...

@tobiasdiez
Copy link
Contributor Author

The live docs issue is tracked at #40463. Could we please get this is to have the docbuild run in GH finally pass again?

@dimpase
Copy link
Member

dimpase commented Jul 21, 2025

I wish these long generated yml files are not getting in the way, but OK.

@user202729
Copy link
Contributor

What does livedoc mean? Besides, what is the effect of this pull request?

@tobiasdiez
Copy link
Contributor Author

What does livedoc mean?

That's a mode where you can edit the example in the browser and rerun it, see the "Sage Live" tab on https://doc-release--sagemath.netlify.app/html/en/a_tour_of_sage/. This is not used (yet?) on the official sage website.

Besides, what is the effect of this pull request?

It fixes the doc build action run that is triggered after a new release (and such a successful run is needed to have the docbuild runs for PRs succeed).

--

@dimpase Thanks for the review.


I've now merged #40383 (and rerun update-conda) into this branch to prevent merge conflicts. Will set back to positive review after the CI is green.

For later reference, updating the compilers needs new givaro and for this first conda-forge/fflas-ffpack-feedstock#21.

@dimpase
Copy link
Member

dimpase commented Jul 24, 2025

updating compilers?

@tobiasdiez
Copy link
Contributor Author

tobiasdiez commented Jul 24, 2025

updating compilers?

In conda, gcc v14 is not working (due to some issues in givaro 4.2.0; 4.2.1 is already on conda but then there are issues with fflas conda-forge/fflas-ffpack-feedstock#21). Sage-the-distro is not affected.

@user202729
Copy link
Contributor

can you merge this into develop of your fork and open a pull request in https://github.com/tobiasdiez/sage/pulls just to double check that the doc is correctly built?

vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 26, 2025
sagemathgh-40379: Fix docbuilding on release tag
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

After sagemath#39973, some necessary steps during the docbuild on release tags
are no longer run (see https://github.com/sagemath/sage/actions/runs/161
00707903/job/45429461356). Sorry - that was my fault. This is fixed
here.

Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/jo
b/46105684396


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
- sagemath#40383
    
URL: sagemath#40379
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 26, 2025
sagemathgh-40379: Fix docbuilding on release tag
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

After sagemath#39973, some necessary steps during the docbuild on release tags
are no longer run (see https://github.com/sagemath/sage/actions/runs/161
00707903/job/45429461356). Sorry - that was my fault. This is fixed
here.

Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/jo
b/46105684396


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
- sagemath#40383
    
URL: sagemath#40379
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 27, 2025
sagemathgh-40379: Fix docbuilding on release tag
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

After sagemath#39973, some necessary steps during the docbuild on release tags
are no longer run (see https://github.com/sagemath/sage/actions/runs/161
00707903/job/45429461356). Sorry - that was my fault. This is fixed
here.

Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/jo
b/46105684396


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
- sagemath#40383
    
URL: sagemath#40379
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 28, 2025
sagemathgh-40379: Fix docbuilding on release tag
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

After sagemath#39973, some necessary steps during the docbuild on release tags
are no longer run (see https://github.com/sagemath/sage/actions/runs/161
00707903/job/45429461356). Sorry - that was my fault. This is fixed
here.

Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/jo
b/46105684396


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
- sagemath#40383
    
URL: sagemath#40379
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 29, 2025
sagemathgh-40379: Fix docbuilding on release tag
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

After sagemath#39973, some necessary steps during the docbuild on release tags
are no longer run (see https://github.com/sagemath/sage/actions/runs/161
00707903/job/45429461356). Sorry - that was my fault. This is fixed
here.

Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/jo
b/46105684396


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
- sagemath#40383
    
URL: sagemath#40379
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
@vbraun vbraun merged commit 98e19c1 into sagemath:develop Aug 2, 2025
22 of 23 checks passed
@kwankyu kwankyu mentioned this pull request Aug 15, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants