Skip to content

Conversation

@bmunkholm
Copy link
Contributor

@bmunkholm bmunkholm commented Jun 23, 2025

testing latest build issue that occurs in all docs repos suddenly:

/home/docs/checkouts/readthedocs.org/user_builds/crate-docs/checkouts/115/docs/index.rst: WARNING: Git clone too shallow

The problem has been observed on those CI runs on GHA, and others: THEME-609, THEME-610.

@bmunkholm bmunkholm changed the title test - ignore build warning: Git clone too shallow Jun 23, 2025
@bmunkholm
Copy link
Contributor Author

bmunkholm commented Jun 23, 2025

sphinx-last-updated-by-git is suddenly pulled in transitively due to a newer sphinx_sitemap (upgraded from 2.6.0 to 2.7.1) - c'est la vie when we don't use lock files for dependencies...

There are several ways to fix this as described in sphinx_last_updated_by_git.

  1. Doing a full/partial fetch of the history when cloning instead of the shallow done by default.
  2. Or disable the warning in conf.py with: suppress_warnings = ['git.too_shallow'].

@amotl Are aware to which extend it will have an effect to disable the warning? Or perhaps we should just do a fuller fetch to allow support for features instead of restricting them? It's still not clear for me what this new feature does (add last-updated date in sitemap.xml?) and if it actually has an effect on our site without other changes to support it?

Are we actually hosting a sitemap.xml file for our docs? (I could only see the root sitemap.xml file - is it included there?)

@bmunkholm
Copy link
Contributor Author

Didn't check yet if we can do either of the solutions just in this repo or it's just makefile rules that are inherited from here to all the projects.

@amotl
Copy link
Member

amotl commented Jun 23, 2025

Hi. I don't know anything about relevant consequences, but any option can be explored. Another one, for example a quick one to restore the builds, would be to NOT upgrade to the offending sphinx_sitemap package, and continue a bit with the version that does not introduce any regressions. Then, we can probe other options without others waiting for unblocking the builds.

@msbt is the expert in maintaining our sitemap.xml's, but if you would like I can also gather relevant information. I dearly hope other departments didn't disconnect the documentation sitemap again, which happened in the past, not just once.

@@ -1 +1,3 @@
from crate.theme.rtd.conf.theme import *

#suppress_warnings = ['git.too_shallow']
Copy link
Member

@amotl amotl Jun 23, 2025

Choose a reason for hiding this comment

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

This one will just apply to the documentation of this tool repository in isolation, nothing else. If we want to roll out a Sphinx setting across all documentation projects, crate-docs-theme is the right place.

Copy link
Member

Choose a reason for hiding this comment

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

I think suppressing warnings should only happen as a very last resort, of course always depending on circumstances.

Copy link
Member

Choose a reason for hiding this comment

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

Let's remove this, merge, and then spread it out to other repositories?

Copy link
Contributor Author

@bmunkholm bmunkholm Jun 24, 2025

Choose a reason for hiding this comment

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

There are still a few open questions:

  1. What depth is needed when fetching?
  2. Do we get any value out of the new sphinx-sitemap? I.e. dates on when a page was updated? Is that for end users or search?
  3. Can we disable this by configuration (assuming we don't need/want it). I remember seeing something, but don't recall exact config option right now...
  4. Will this be fixed in sphinx-sitemap itself?

Therefore itt seems very attractive to be able to fix this temporarily for all docs builds just one place, so I would suggest to pin sphinx-sitemap in crate-docs-theme instead for now.

Copy link
Member

@amotl amotl Jun 25, 2025

Choose a reason for hiding this comment

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

Hi Brian.

It seems very attractive to be able to fix this temporarily for all docs builds just one place, so I would suggest to crate/crate-docs-theme#611 instead for now.

That's absolutely way to go in such a situation, thank you so much.

Comment on lines +14 to +16
jobs:
post_checkout:
- git fetch --unshallow || true
Copy link
Member

@amotl amotl Jun 23, 2025

Choose a reason for hiding this comment

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

It looks like the build is not failing on RTD (is it?), so we don't need this update here, just for GHA?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it also fails on RTD, so this is needed.

Copy link
Member

Choose a reason for hiding this comment

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

Oh ok. Do you have a sample? Maybe an update of Git on their ends responsible for the regression?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://docs.readthedocs.com/platform/stable/build-customization.html#unshallow-git-clone describes this (in general). I doubt RTD can do anything about this except describe the issue in general?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://app.readthedocs.org/projects/crate-jdbc/builds/28608809/ shows an example of the same build problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://pypi.org/project/sphinx-last-updated-by-git/ describes how to handle this issue if the extension is used.

Copy link
Member

Choose a reason for hiding this comment

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

Wow, thanks.

@amotl
Copy link
Member

amotl commented Jun 23, 2025

@amotl
Copy link
Member

amotl commented Jun 23, 2025

[...] gathering relevant information about documentation's sitemap.xml.

You can find more information on a non-public repository here.

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.

3 participants