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

Mula environment docs are broken due to Pydantic v2 upgrade #1815

Closed
Darwinkel opened this issue Sep 21, 2023 · 2 comments · Fixed by #2257
Closed

Mula environment docs are broken due to Pydantic v2 upgrade #1815

Darwinkel opened this issue Sep 21, 2023 · 2 comments · Fixed by #2257
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation mula Issues related to the scheduler regression Something is broken that explicitly worked before

Comments

@Darwinkel
Copy link
Contributor

The online docs are missing Mula's environment settings:
image

See the CI output at the Compile static HTML step (e.g. https://github.com/minvws/nl-kat-coordination/actions/runs/6260541583/job/16998773587).

settings-doc==3.0.0 has support for Pydantic v2 which is great. It also includes an updated markdown.jinja file so we should be good for the future.

Unfortunately for us right now, this means that we are in a situation where some of our modules support Pydantic v2, and some do not. settings-doc==2.0.0 must be used for Pydantic v1 installs (no backwards compatibility).

We essentially have three options here:

  1. I checked, and we can create a workaround in mula's settings such that it tries to load the old pydantic BaseSettings module when DOCS=True. Unfortunately, the rest of the settings file uses some of the newer features in Pydantic which means we will have to create alternate routes for those snippets too. Will get messy very quickly.
  2. Focus on upgrading all modules to Pydantic v2
  3. Create two separate settings-doc compilation pipelines in GitHub Actions and the Makefile, one for Pydantic v1 and one for Pydantic v2. They will have to use two separate jinja templates, but that should be doable. The main challenge here is making sure that a part of the pipeline installs and uses the older Pydantic version, and one part of the pipeline installs and uses Pydantic v2.

Thoughts and opinions are welcome.

@Darwinkel Darwinkel added bug Something isn't working documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file mula Issues related to the scheduler regression Something is broken that explicitly worked before labels Sep 21, 2023
@Darwinkel Darwinkel added this to KAT Sep 21, 2023
@github-project-automation github-project-automation bot moved this to Incoming features / Need assessment in KAT Sep 21, 2023
@praseodym
Copy link
Contributor

We'll want to (or have to) upgrade to Pydantic v2 eventually, so maybe it's best to focus on that?

Looking at the upgrade instructions, there's even a upgrade code transformation tool, so maybe it's not that big of an effort?

@underdarknl
Copy link
Contributor

related to #1841

@ammar92 ammar92 self-assigned this Jan 2, 2024
@ammar92 ammar92 moved this from Todo (In this sprint) to In Progress in KAT Jan 2, 2024
@ammar92 ammar92 linked a pull request Jan 2, 2024 that will close this issue
7 tasks
@ammar92 ammar92 moved this from In Progress to Ready for merge in KAT Jan 3, 2024
@github-project-automation github-project-automation bot moved this from Ready for merge to Done in KAT Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation mula Issues related to the scheduler regression Something is broken that explicitly worked before
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants