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

Config: avoid default sphinx/mkdocs steps #11819

Open
agjohnson opened this issue Dec 3, 2024 · 6 comments
Open

Config: avoid default sphinx/mkdocs steps #11819

agjohnson opened this issue Dec 3, 2024 · 6 comments
Assignees
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code Needed: design decision A core team decision is required

Comments

@agjohnson
Copy link
Contributor

With the addition of build.jobs.builds and friends, we now need to figure out how to avoid the default build jobs/commands that are triggered from the Sphinx/MkDocs builders. This PR illustrates what is happening and needs to change:

The caveat here is that some projects still do use the Sphinx builder without specifying the sphinx configuration key. We should find a plan that supports all these use cases, probably without user intervention. Long term, sphinx and mkdocs should be mandatory for using either of these builders.

@agjohnson agjohnson added Accepted Accepted issue on our roadmap Improvement Minor improvement to code Needed: design decision A core team decision is required labels Dec 3, 2024
@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Dec 3, 2024
@stsewd
Copy link
Member

stsewd commented Dec 3, 2024

We default to use sphinx if none of the options are specified, changing that default will be a breaking change. Maybe we can add another key/option to specify that a "generic" builder is being used, or to signal that all steps shouldn't use the defaults (build.keep_default_jobs: false).

@humitos
Copy link
Member

humitos commented Dec 4, 2024

I don't want to add another key for this -it doesn't seem needed and adds a lot of complexity.

What @agjohnson suggested in #11810 (comment) is a good first step here.

if there are build jobs and no sphinx key, we don't do the default steps


We default to use sphinx if none of the options are specified, changing that default will be a breaking change.

There are very few projects without sphinx configuration key, and we've been waiting to deprecate this behavior and make sphinx.configuration mandatory (see #10637) --which makes also sphinx and or mkdocs keys mandatory for current projects. We can tell those projects currently not specifying sphinx configuration key to make it explicit; while we implement this feature.

The way to explicitly tell Read the Docs to run default jobs should be by defining mkdocs or sphinx configuration keys. If any of those keys are not defining, there are not default jobs to run.

@agjohnson
Copy link
Contributor Author

My idea was loose too, there are probably more cases out side build.jobs.build where we shouldn't implicitly use the Sphinx builder too. But the plan feels reasonable at least, projects relying on implicit Sphinx configuration probably aren't going to add build.jobs.build suddenly.

@stsewd stsewd moved this from Planned to In progress in 📍Roadmap Dec 4, 2024
@stsewd
Copy link
Member

stsewd commented Dec 5, 2024

I think we should first deprecate the default behavior before changing it, or trying to guess if Sphinx should be used or not.

@agjohnson
Copy link
Contributor Author

Ideally, we would wait for deprecation, but given how important build.jobs.build should be for users, I would not wait for this. This is holding back the build.jobs.build implementation because of a rather small number of projects using the implicit logic. I feel we should make build.jobs.build consistently usable as soon as possible.

@humitos
Copy link
Member

humitos commented Dec 10, 2024

I agree with @agjohnson here.

However, @stsewd, you can do both at the same time:

  1. Declare a soon deprecation date (eg. Jan 10th; one month from now) --given the low number of projects.
  2. Follow the steps written in Deprecation: stop auto-finding conf.py/mkdocs.yml from the repository #10637 (comment).
  3. Continue implementing this issue while we wait for that deprecation time.

With the implementation, review and testing time; it will be close to Jan 10th by that time 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code Needed: design decision A core team decision is required
Projects
Status: Needs review
Development

No branches or pull requests

3 participants