Skip to content

Feature flag: MkDocs use latest has its logic inverted #10402

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

Closed
humitos opened this issue Jun 7, 2023 · 3 comments · Fixed by #10515
Closed

Feature flag: MkDocs use latest has its logic inverted #10402

humitos opened this issue Jun 7, 2023 · 3 comments · Fixed by #10515
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@humitos
Copy link
Member

humitos commented Jun 7, 2023

Take a look at this code,

negative=self.project.get_feature_value(
Feature.USE_MKDOCS_LATEST,
positive='mkdocs<1.1',
negative='mkdocs',
),

It seems when DEFAULT_TO_MKDOCS_0_17_3=False and USE_MKDOCS_LATEST=True, we are installing mkdocs<1.1 when we should be installing mkdocs (latest).

Reverting this logic is easy. However, we should take a look at our data in Metabase to know how many projects this will affect and decide what/how to do.

Related #9779

@humitos humitos added Bug A bug Accepted Accepted issue on our roadmap labels Jun 7, 2023
@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Jun 7, 2023
@humitos
Copy link
Member Author

humitos commented Jul 3, 2023

@ericholscher are we OK just inverting this logic or do we want to do something before making the change? I'd like to start installing the latest MkDocs for projects instead of an old version 😄

humitos added a commit that referenced this issue Jul 4, 2023
I created a new feature flag called `INSTALL_LATEST_CORE_REQUIREMENTS` that does
not depend on any other feature flag. Its goal is to always install the latest
Python packages.

We are trying to move away from pinning the dependencies on our side and telling
users to do that on their side if they want to have reproducible builds over
time.

I think this is the best outcome for new projects since they will immediately
use the latest versions of everything instead of old (and maybe broken)
dependencies.

I propose to set a particular date for this feature flag and make new projects
to start building with all the latest dependencies. This will, at least, stop
making the problem bigger. Later, we can decide how to communicate to old
projects that we are going to install the latest requirements and if they don't
want that, they should pin their dependencies. We can follow our new and shiny
deprecation path we have built and tested in the last month.

Related readthedocs/meta#8
Related #9562
Related #10402
Related #9081
@ericholscher
Copy link
Member

@humitos I'm 👍 on unbreaking mkdocs, so let's do it. Alternatively, we just remove the feature flag, if old projects were already upgraded?

@humitos
Copy link
Member Author

humitos commented Jul 6, 2023

Alternatively, we just remove the feature flag

I'll keep the flag for now, but fixing the logic as the first step. We will be using #10508 sooner than later anyways.

humitos added a commit that referenced this issue Jul 6, 2023
The logic was inverted and we were installing old MkDocs version to projects
with `USE_MKDOCS_LATEST` feature flag.

Closes #10402
@humitos humitos moved this from Planned to Needs review in 📍Roadmap Jul 6, 2023
@github-project-automation github-project-automation bot moved this from Needs review to Done in 📍Roadmap Jul 10, 2023
humitos added a commit that referenced this issue Jul 10, 2023
* MkDocs: fix `USE_MKDOCS_LATEST` feature flag logic

The logic was inverted and we were installing old MkDocs version to projects
with `USE_MKDOCS_LATEST` feature flag.

Closes #10402

* MkDocs: remove `USE_MKDOCS_LATEST`

This is not required anymore since the logic was inverted and we were installing
always the latest version for old projects, but the old version for new
projects.

It's better to have all of them installing the latest version and call it a day :)
humitos added a commit that referenced this issue Jul 12, 2023
* Build: install all the latest Python "core requirements"

I created a new feature flag called `INSTALL_LATEST_CORE_REQUIREMENTS` that does
not depend on any other feature flag. Its goal is to always install the latest
Python packages.

We are trying to move away from pinning the dependencies on our side and telling
users to do that on their side if they want to have reproducible builds over
time.

I think this is the best outcome for new projects since they will immediately
use the latest versions of everything instead of old (and maybe broken)
dependencies.

I propose to set a particular date for this feature flag and make new projects
to start building with all the latest dependencies. This will, at least, stop
making the problem bigger. Later, we can decide how to communicate to old
projects that we are going to install the latest requirements and if they don't
want that, they should pin their dependencies. We can follow our new and shiny
deprecation path we have built and tested in the last month.

Related readthedocs/meta#8
Related #9562
Related #10402
Related #9081

* Build: remove deprecated dependencies

* Build: install latest core requirements when using Conda

* Docs: update default versions documentation to match the changes

* Feedback from review

Do not install `sphinx-rtd-theme` and clarify the docstring.

* Update documentation
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 Bug A bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants