Skip to content
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

duplicate label warnings in 5.2.0 #10870

Closed
vincentkfu opened this issue Sep 26, 2022 · 1 comment
Closed

duplicate label warnings in 5.2.0 #10870

vincentkfu opened this issue Sep 26, 2022 · 1 comment
Labels

Comments

@vincentkfu
Copy link

Describe the bug

Starting with sphinx 5.2.0 duplicate label warnings now appear

How to Reproduce

$ git clone https://github.com/vincentkfu/sphinx-issue
$ cd fio/doc
$ python3 -m pip install sphinx==5.2.0
$ make html

Expected behavior

No warnings should appear as in 5.1.1

Your project

https://github.com/vincentkfu/sphinx-issue

Screenshots

No warnings in 5.1.1

(sphinx511) root@sjcvldevvm19:~/fio-dev/sphinx-issue/sphinx511# git clone https://github.com/vincentkfu/sphinx-issue
Cloning into 'sphinx-issue'...
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 17 (delta 3), reused 16 (delta 2), pack-reused 0
Unpacking objects: 100% (17/17), 2.58 KiB | 377.00 KiB/s, done.
(sphinx511) root@sjcvldevvm19:~/fio-dev/sphinx-issue/sphinx511# cd sphinx-issue/
(sphinx511) root@sjcvldevvm19:~/fio-dev/sphinx-issue/sphinx511/sphinx-issue# make html
Running Sphinx v5.1.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] index2
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index2
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in build/html.

Warning in 5.2.0

(sphinx520) root@sjcvldevvm19:~/fio-dev/sphinx-issue/sphinx520# git clone https://github.com/vincentkfu/sphinx-issue
Cloning into 'sphinx-issue'...
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 17 (delta 3), reused 16 (delta 2), pack-reused 0
Unpacking objects: 100% (17/17), 2.58 KiB | 377.00 KiB/s, done.
(sphinx520) root@sjcvldevvm19:~/fio-dev/sphinx-issue/sphinx520# cd sphinx-issue/
(sphinx520) root@sjcvldevvm19:~/fio-dev/sphinx-issue/sphinx520/sphinx-issue# make html
Running Sphinx v5.2.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] index2
/root/fio-dev/sphinx-issue/sphinx520/sphinx-issue/issue.rst:: WARNING: duplicate label int, other instance in /root/fio-dev/sphinx-issue/sphinx520/sphinx-issue/source/index.rst
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index2
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 1 warning.

The HTML pages are in build/html.

OS

Ubuntu 20.04

Python version

3.8

Sphinx version

5.2.0

Sphinx extensions

No response

Extra tools

No response

Additional context

Appears related to #10781

This was observed when the GitHub actions macOS 11 image started providing Sphinx 5.2.1:

https://github.com/axboe/fio/actions/runs/3129974184/jobs/5079696775

We fail our documentation build when warnings are seen. So our CI now fails with Sphinx 5.2.1 when it used to work with Sphinx 5.1.1.

Working Sphinx 5.1.1 build: https://github.com/axboe/fio/actions/runs/3106980788/jobs/5034529793

@jbms @AA-Turner

Perhaps the path forward is to suppress the warning as suggested by @jbms

vincentkfu added a commit to vincentkfu/fio that referenced this issue Sep 27, 2022
Sphinx prints warnings when it encounters duplicate labels. In HOWTO.rst
are labels for int, irange, and bool. We include HOWTO.rst in both
fio_doc.rst and fio_man.rst. Since labels must be unique across all
files, Sphinx prints warnings for these labels.

For an unknown reason, Sphinx previously did not issue warnings for the
duplicate labels mentioned above until 5.2.0. But Sphinx 5.2.1 is now
installed for the macOS 11 image in GitHub Actions. So now we see Sphinx
warnings when building documentation in GitHub Actions.

Our CI treats Sphinx warnings as test failures. So our macOS builds are
marked as failures.

Resolve this problem by eliminating the separate fio_man.rst file and
just building the manpage from the largely equivalent fio_doc.rst.

Successful build with 5.1.1: https://github.com/axboe/fio/actions/runs/3106980788/jobs/5034529793
Failed build with 5.2.1: https://github.com/axboe/fio/actions/runs/3129974184/jobs/5079696775

Link: sphinx-doc/sphinx#10781
Link: sphinx-doc/sphinx#10870
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
axboe pushed a commit to axboe/fio that referenced this issue Sep 27, 2022
Sphinx prints warnings when it encounters duplicate labels. In HOWTO.rst
are labels for int, irange, and bool. We include HOWTO.rst in both
fio_doc.rst and fio_man.rst. Since labels must be unique across all
files, Sphinx prints warnings for these labels.

For an unknown reason, Sphinx previously did not issue warnings for the
duplicate labels mentioned above until 5.2.0. But Sphinx 5.2.1 is now
installed for the macOS 11 image in GitHub Actions. So now we see Sphinx
warnings when building documentation in GitHub Actions.

Our CI treats Sphinx warnings as test failures. So our macOS builds are
marked as failures.

Resolve this problem by eliminating the separate fio_man.rst file and
just building the manpage from the largely equivalent fio_doc.rst.

Successful build with 5.1.1: https://github.com/axboe/fio/actions/runs/3106980788/jobs/5034529793
Failed build with 5.2.1: https://github.com/axboe/fio/actions/runs/3129974184/jobs/5079696775

Link: sphinx-doc/sphinx#10781
Link: sphinx-doc/sphinx#10870
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
@vincentkfu
Copy link
Author

I was able to restructure our document build to avoid duplicate labels.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant