-
Notifications
You must be signed in to change notification settings - Fork 499
Update Python and Node.js versions in Dockerfile #1329
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
Conversation
ahmed-arb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for the PR! Could you please add a changelog entry?
edx-platform is running and testing with Python 3.12 and Node 24 now so update the dockerfile to match that.
|
Done @ahmed-arb |
| ARG PYTHON_VERSION=3.11.8 | ||
| ARG PYTHON_VERSION=3.12.12 | ||
| ENV PYENV_ROOT=/opt/pyenv | ||
| RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.36 --depth 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to update the pyenv version here, after this change, I'm getting an error when trying to build from scratch, it says that version 3.12.12 was not found (sorry I lost the logs with the exact errors, I'm currently building with the previous commit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, an update to Pyenv was also merged as a part of this but atleast the node version part of this change should get backported to the release because Ulmo is meant to run with Node 24
Python 3.12 is less fully tested with ulmo so it should not be backported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we will have to revert this change altogether. After updating the pyenv version I got the following error:
> [production 23/37] RUN ./manage.py cms --settings=tutor.i18n compile_xblock_translations:
3.027 Key BLOCK_STRUCTURES_SETTINGS 'STORAGE_CLASS' not found in storage settings {'COURSE_PUBLISH_TASK_DELAY': 30, 'TASK_DEFAULT_RETRY_DELAY': 30, 'TASK_MAX_RETRIES': 5}.Using default storage path.
4.622 Traceback (most recent call last):
4.622 File "/openedx/edx-platform/./manage.py", line 99, in <module>
4.622 execute_from_command_line([sys.argv[0]] + django_args)
4.622 File "/openedx/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
4.623 utility.execute()
4.623 File "/openedx/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
4.623 self.fetch_command(subcommand).run_from_argv(self.argv)
4.623 File "/openedx/venv/lib/python3.12/site-packages/django/core/management/base.py", line 416, in run_from_argv
4.623 self.execute(*args, **cmd_options)
4.623 File "/openedx/venv/lib/python3.12/site-packages/django/core/management/base.py", line 457, in execute
4.623 self.check(**check_kwargs)
4.623 File "/openedx/venv/lib/python3.12/site-packages/django/core/management/base.py", line 492, in check
4.623 all_issues = checks.run_checks(
4.623 ^^^^^^^^^^^^^^^^^^
4.623 File "/openedx/venv/lib/python3.12/site-packages/django/core/checks/registry.py", line 89, in run_checks
4.623 new_errors = check(app_configs=app_configs, databases=databases)
4.623 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4.623 File "/openedx/venv/lib/python3.12/site-packages/django/core/checks/urls.py", line 16, in check_url_config
4.623 return check_resolver(resolver)
4.623 ^^^^^^^^^^^^^^^^^^^^^^^^
4.623 File "/openedx/venv/lib/python3.12/site-packages/django/core/checks/urls.py", line 26, in check_resolver
4.623 return check_method()
4.623 ^^^^^^^^^^^^^^
4.623 File "/openedx/venv/lib/python3.12/site-packages/django/urls/resolvers.py", line 531, in check
4.624 for pattern in self.url_patterns:
4.624 ^^^^^^^^^^^^^^^^^
4.624 File "/openedx/venv/lib/python3.12/site-packages/django/utils/functional.py", line 47, in __get__
4.624 res = instance.__dict__[self.name] = self.func(instance)
4.624 ^^^^^^^^^^^^^^^^^^^
4.624 File "/openedx/venv/lib/python3.12/site-packages/django/urls/resolvers.py", line 718, in url_patterns
4.624 patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
4.624 ^^^^^^^^^^^^^^^^^^^
4.624 File "/openedx/venv/lib/python3.12/site-packages/django/utils/functional.py", line 47, in __get__
4.624 res = instance.__dict__[self.name] = self.func(instance)
4.624 ^^^^^^^^^^^^^^^^^^^
4.624 File "/openedx/venv/lib/python3.12/site-packages/django/urls/resolvers.py", line 711, in urlconf_module
4.624 return import_module(self.urlconf_name)
4.624 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4.624 File "/opt/pyenv/versions/3.12.12/lib/python3.12/importlib/__init__.py", line 90, in import_module
4.625 return _bootstrap._gcd_import(name[level:], package, level)
4.625 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4.625 File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
4.625 File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
4.625 File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
4.625 File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
4.625 File "<frozen importlib._bootstrap_external>", line 999, in exec_module
4.625 File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
4.625 File "/openedx/edx-platform/cms/urls.py", line 20, in <module>
4.625 from cms.djangoapps.contentstore import views as contentstore_views
4.625 File "/openedx/edx-platform/cms/djangoapps/contentstore/views/__init__.py", line 17, in <module>
4.625 from .transcript_settings import *
4.625 File "/openedx/edx-platform/cms/djangoapps/contentstore/views/transcript_settings.py", line 14, in <module>
4.625 from cms.djangoapps.contentstore.transcript_storage_handlers import (
4.625 File "/openedx/edx-platform/cms/djangoapps/contentstore/transcript_storage_handlers.py", line 29, in <module>
4.625 from .video_storage_handlers import TranscriptProvider
4.625 File "/openedx/edx-platform/cms/djangoapps/contentstore/video_storage_handlers.py", line 20, in <module>
4.625 from boto.s3.connection import S3Connection
4.625 File "/openedx/venv/lib/python3.12/site-packages/boto/__init__.py", line 27, in <module>
4.626 from boto.pyami.config import Config, BotoConfigLocations
4.626 File "/openedx/venv/lib/python3.12/site-packages/boto/pyami/config.py", line 29, in <module>
4.626 from boto.compat import expanduser, ConfigParser, NoOptionError, NoSectionError, StringIO
4.626 File "/openedx/venv/lib/python3.12/site-packages/boto/compat.py", line 52, in <module>
4.626 from boto.vendored.six.moves import filter, http_client, map, _thread, \
4.626 ModuleNotFoundError: No module named 'boto.vendored.six.moves'
------
Dockerfile:203
--------------------
201 | translations/studio-frontend/src/i18n/messages:conf/plugins-locale/studio-frontend
202 | RUN ./manage.py lms --settings=tutor.i18n compile_xblock_translations
203 | >>> RUN ./manage.py cms --settings=tutor.i18n compile_xblock_translations
204 | RUN ./manage.py lms --settings=tutor.i18n compile_plugin_translations
205 | RUN ./manage.py lms --settings=tutor.i18n compilemessages -v1
--------------------
ERROR: failed to solve: process "/bin/sh -c ./manage.py cms --settings=tutor.i18n compile_xblock_translations" did not complete successfully: exit code: 1There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahmed-arb can you provide the command you ran that caused this error? I was able to build with python 3.12 for my dev environment without any issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I ran these commands locally with python 3.12 and the latest edx-platform and they do work just fine and I've re-built my tutor dev images and they also built just fine so I think the issue may be elsewhere. If you ran into this locally, did you have an out of date version of edx-platform mounted possibly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried building openedx image with ulmo.1 and ran into this with Pyenv 2.6.20. I checked ulmo.1 is using the deprecated version of boto, while master is using boto3, which (in your case) might have worked with Python 3.12. We should target tutor main with this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, makes sense so Python 3.12 for tutor main and leave python 3.11 for release until Verawood
edx-platform is running and testing with Python 3.12 and Node 24 now so update the dockerfile to match that.