Skip to content

Upgrade to Ubuntu 24.04 for our application #12002

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

Merged
merged 9 commits into from
Feb 19, 2025
Merged

Upgrade to Ubuntu 24.04 for our application #12002

merged 9 commits into from
Feb 19, 2025

Conversation

humitos
Copy link
Member

@humitos humitos commented Feb 18, 2025

  • Use Ubuntu 24.04 for our Docker images
  • The application runs with Python 3.12 now
  • Run tests with Python 3.12
  • Update APT package names
  • Install uv in the default directory ~/.local/bin
  • Add uv to the PATH
  • Create a virtualenv inside the Docker image for our application. --system option does not work anymore with the newer pip versions. It fails saying that we should install Python dependencies using system package.
  • Upgrade Celery dependency to be compatible with Python 3.12
  • The pickle error we used to see with Celery does not happen anymore with the newer version + py3.12
  • Remove tzdata because it's installed automatically now

ToDo

  • tests pass locally
  • build a failed build that raises ConfigError without breaking
  • build a success build
  • tests pass in CircleCI
  • update -ops to use Ubuntu 24.04
  • build an AMI
  • deploy one instance and run a build there
  • do the same upgrade on .com

Notes

  • All the Python commands inside the Docker container needs to be prefixed with uv run now. Example: uv run tox -e 312 or uv run django-admin and similars.

Related https://github.com/readthedocs/readthedocs-ops/issues/1496
Closes #12000

@humitos humitos requested a review from a team as a code owner February 18, 2025 14:41
@humitos humitos requested a review from stsewd February 18, 2025 14:41
@humitos humitos requested a review from a team as a code owner February 18, 2025 15:07
@humitos humitos requested a review from ericholscher February 18, 2025 15:07
@humitos
Copy link
Member Author

humitos commented Feb 19, 2025

I deployed a web and a build instance and everything worked fine after some small updates. The build succeeded: https://app.readthedocs.org/projects/test-builds/builds/27242664/

This is last log line from the build task:

Feb 19 14:21:36 build-default-i-0a2edd075dcdce271 supervisord: build readthedocs[1456]: [info     ] Build finished.                [readthedocs.projects.tasks.builds:776] artifacts=['html', 'pdf'] build_id=27242664 builder=build-default-i-0a2edd075dcdce271 commit=None length=156 path_resolved=/home/docs/checkouts/readthedocs.org/user_builds/test-builds/checkouts/full-feature/.readthedocs.yaml project_slug=test-builds request_id=206e0526-3d8d-45f6-8bfc-1637a31f40ab success=True task_id=bba00d5b-329a-4a02-a8de-bdeeea640684 user_id=4890 version_slug=full-feature

@humitos
Copy link
Member Author

humitos commented Feb 19, 2025

I'm merging this so we can all start testing it locally. I will jump into .com now.

@humitos humitos merged commit 158e3ec into main Feb 19, 2025
2 of 5 checks passed
@humitos humitos deleted the humitos/ubuntu24.04 branch February 19, 2025 14:27
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.

Upgrade system to Ubuntu 24.04
2 participants