Commit Graph

564 Commits

Author SHA1 Message Date
Régis Behmo 0ccf48690a feat: upgrade to quince 2023-12-11 20:41:32 +01:00
Overhang.IO 71e469174f Merge remote-tracking branch 'origin/master' into nightly 2023-12-10 22:19:14 +00:00
Régis Behmo 0d997c9479 feat: auto-mount edx-platform python requirements
These changes make to possible to run:

    tutor mounts add /path/to/my-xblock

The xblock directory with then be auto-magically bind-mounted in the
"openedx" image at build time, and the lms*/cms* containers at run time.

This makes it effectively possible to work as a developer on
edx-platform requirements.

We take the opportunity to move some openedx-specific code to a
dedicated module.

Close https://github.com/openedx/wg-developer-experience/issues/177
2023-12-10 22:57:08 +01:00
Régis Behmo 6da97d22f4 feat: local.overhang.io -> local.edly.io
The new domain name points to 127.0.0.1, just like the previous one. We
keep the local.overhang.io domain names for backward compatibility. In
the future, we hope to migrate to "*.openedx.io" but that will not
happen before Redwood.

Close #945
2023-12-09 15:51:31 +01:00
Régis Behmo 8d815bc317 Merge branch 'master' into nightly 2023-11-29 11:21:51 +01:00
Régis Behmo ff8091bef2 feat: simplify nightly management
Bumping the `OPENEDX_COMMON_VERSION` in the master branch usually
creates a conflict when we merge the change in the nightly branch. To
avoid this conflict, we add some logic to the `OPENEDX_COMMON_VERSION`.

This change should be invisible for most users.

This partially addresses issue #936.
2023-11-29 10:49:53 +01:00
Régis Behmo 913a1adae4 Merge branch 'master' into nightly 2023-11-23 12:58:04 +01:00
Omar Al-Ithawi 65ba0d2de2 fix: fix `ulimits` error for elasticsearch in Docker rootless mode
disable `ulimits` in rootless docker mode by setting them to zero
2023-11-23 12:36:07 +01:00
Overhang.IO c4cc7279fc Merge remote-tracking branch 'origin/master' into nightly 2023-11-23 09:02:05 +00:00
Florian Haas 8fdb6f52d9 fix: Reduce MySQL binlog expiry from 30 days to 3
MySQL 8 defaults to a binlog expiry period of 2592000 seconds
(30 days), which for Tutor/Open edX purposes can be considered
excessive.

On the one hand, it is unlikely that a MySQL server configured for
Tutor uses MySQL replication at all (considering that up until Tutor
15 and MySQL 5.7, the binlog was disabled by default, rendering
replication impossible). Even if it does, a replica lagging more than
two days behind the primary server would be unacceptable.

Likewise, it is unlikely that an Open edX database is backed up less
than once a day, thus is is unlikely that Open edX admins would
benefit from the ability to do point-in-time restore over a 30-day
period.

On the other hand, having a 30-day binlog expiry period can
considerably increase the storage space requirements for the MySQL
container, particularly on busy Open edX platforms. When left
unchecked, this can even cause the MySQL container to run into "No
space left on device" situations, disabling the MySQL database
altogether. Thus, the MySQL default settings are likely to be a net
disadvantage for Open edX admins.

Finally, all of the above considerations apply only if the Open edX
administrator has chosen to run their own MySQL and not opted for a
DBaaS solution like AWS RDS.

Thus, it should be acceptable to run with a reduced binlog expiry
period of 3 days (rather than 30) by default.

Therefore, inject the --binlog-expire-logs-seconds=259200 argument
into the Tutor-generated command to start mysqld.

Reference:
https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_expire_logs_seconds
2023-11-23 09:39:55 +01:00
Régis Behmo a0c66ca650 feat: upgrade to palm.4 2023-11-16 22:36:32 +01:00
Kyle McCormick c273e7f105
feat!: assume BuildKit is available 2023-10-27 10:54:23 +02:00
Kyle D. McCormick 7f47c3c8af fix: include full-complement paramters in ``JWT_PRIVATE_SIGNING_JWK``
Addresses the breaking upstream change in this commit:
92731be0dc

See Changelog entry for details.
2023-10-23 11:15:40 +02:00
Overhang.IO 8d463941be Merge remote-tracking branch 'origin/master' into nightly 2023-10-16 16:40:59 +00:00
Fateme Khodayari 34bb401da5
fix: ora2 uploads in cms 2023-10-16 18:34:28 +02:00
Régis Behmo 9cba06595e feat: upgrade to open-release/palm.3 2023-10-13 16:54:45 +02:00
Overhang.IO 8c778477a0 Merge remote-tracking branch 'origin/master' into nightly 2023-10-11 08:22:35 +00:00
Emad Rad f4dc508c19
fix: 600GB openedx-dev image on macOS
On macOS, building the "openedx-dev" Docker image resulted in an image that required more than 600 GB of disk space. This was due to the `adduser` command which was called with a user ID of 2x10⁹ (on macOS only). This resulted in a very large /var/log/faillog file, hence the image size.

Related upstream discussion: https://github.com/moby/moby/issues/5419
Close https://github.com/openedx/wg-developer-experience/issues/178
2023-10-11 10:02:03 +02:00
Overhang.IO eb45eb3a4b Merge remote-tracking branch 'origin/master' into nightly 2023-10-10 10:16:02 +00:00
Régis Behmo 575a56b767 fix: build error caused by removed py2neo package
On Oct. 10, py2neo package was abruptly removed from pypi, GitHub, and
the py2neo website now displays just a super funny meme: https://py2neo.org/

Yes, we should get rid of that dependency, but we are still supposed to
support existing users. So we install py2neo from our fork.
2023-10-10 11:37:40 +02:00
Overhang.IO 2ce2b748b8 Merge remote-tracking branch 'origin/master' into nightly 2023-10-05 07:13:45 +00:00
David Ormsbee b3cde02330 fix: override CMS_BASE setting in Studio for dev
The LMS was overriding CMS_BASE properly, but Studio (CMS) configuration
was not. That meant that Studio's CMS_BASE in dev mode was using the
devstack default of localhost:18010 (because this is what's defined in
edx-platform). This in turn broke parts of Studio that use this value,
such as the XBlock v2 API (/api/xblock/v2).

This commit derives the value of the CMS_BASE Django setting from
Tutor's CMS_HOST config value, in the same way that the LMS does it.
2023-10-05 09:06:28 +02:00
Overhang.IO 32645429b2 Merge remote-tracking branch 'origin/master' into nightly 2023-10-04 09:42:26 +00:00
Paulo Viadanna 06ad1978a4 fix: adds mongodb connect=False
Adding connect=False to the LMS and CMS' MongoDB connection to prevent
ServerSelectionError after a cluster failover.
2023-10-04 09:48:08 +02:00
Overhang.IO 33bf0d4a65 Merge remote-tracking branch 'origin/master' into nightly 2023-10-02 09:20:04 +00:00
Régis Behmo d6e26c614c fix: file upload in open response assessments (ora2)
For some reason, the ora2 cache configuration had disappeared in the
upgrade to Palm.

This issue was initially raised here:
https://discuss.openedx.org/t/palm-2-ora-file-upload-failure/11332

Close #907.
2023-10-02 11:13:11 +02:00
Overhang.IO e8c66bfad6 Merge remote-tracking branch 'origin/master' into nightly 2023-09-13 09:34:56 +00:00
Régis Behmo 00c58e7a9e chore: upgrade nodeenv to fix nodejs install
We upgrade nodeenv as an attempt to fix incomplete reads.

From time to time we face the following error:

	#67 [linux/amd64 nodejs-requirements 2/4] RUN nodeenv /openedx/nodeenv --node=16.14.0 --prebuilt
	#67 0.338  * Install prebuilt node (16.14.0) .Incomplete read while readingfrom https://nodejs.org/download/release/v16.14.0/node-v16.14.0-linux-x64.tar.gz
	#67 204.1 .
	#67 204.1 Traceback (most recent call last):
	#67 204.1   File "/openedx/venv/bin/nodeenv", line 8, in <module>
	#67 204.1     sys.exit(main())
	#67 204.1   File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py", line 1104, in main
	#67 204.1     create_environment(env_dir, args)
	#67 204.1   File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py", line 980, in create_environment
	#67 204.1     install_node(env_dir, src_dir, args)
	#67 204.1   File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py", line 739, in install_node
	#67 204.1     install_node_wrapped(env_dir, src_dir, args)
	#67 204.1   File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py", line 762, in install_node_wrapped
	#67 204.1     download_node_src(node_url, src_dir, args)
	#67 204.1   File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py", line 602, in download_node_src
	#67 204.1     with ctx as archive:
	#67 204.1   File "/opt/pyenv/versions/3.8.15/lib/python3.8/contextlib.py", line 113, in __enter__
	#67 204.1     return next(self.gen)
	#67 204.1   File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py", line 573, in tarfile_open
	#67 204.1     tf = tarfile.open(*args, **kwargs)
	#67 204.1   File "/opt/pyenv/versions/3.8.15/lib/python3.8/tarfile.py", line 1601, in open
	#67 204.1     saved_pos = fileobj.tell()
	#67 204.1 AttributeError: 'bytes' object has no attribute 'tell'

This change was added to 1.8.0 as an attempt to resolve the issue: https://github.com/ekalinin/nodeenv/pull/329

We are not sure it will work every time, but it can't hurt.
2023-09-13 11:01:04 +02:00
Overhang.IO 06b021df23 Merge remote-tracking branch 'origin/master' into nightly 2023-08-28 07:59:39 +00:00
Florian Haas cfb786ab2d fix: Apply mysqld character set fix to Kubernetes deployment
This is a follow-up fix to #819, where the corresponding change was
added to the mysqld invocation in the "tutor local" (that is,
docker-compose) deployment method, but omitted from its "tutor k8s"
equivalent.
2023-08-28 09:53:38 +02:00
Overhang.IO c475ff63e6 Merge remote-tracking branch 'origin/master' into nightly 2023-08-28 07:53:24 +00:00
Kyle D. McCormick 97b999b519 docs: tutor uses `docker compose` now, not `docker-compose` 2023-08-28 09:48:42 +02:00
Régis Behmo 021a305084 Merge branch 'master' into nightly 2023-08-16 19:07:07 +02:00
Régis Behmo 2a47100d6a fix: broken mysql after palm upgrade
This fix is for a rather serious issue that affects users who upgrade
from Olive to Palm. The client mysql charset and collation was
incorrectly set to utf8mb4, while the server stil runs utf8mb3. Only
users who run the mysql container are affected.

To resolve this issue, we explicitely configure the client to use the
utf8mb3 charset/collation.

Important note: users who have somehow managed to upgrade from olive to
Palm before may find themselves in an undefined state. They might have
to fix their mysql data manually. Same thing for users who launched Palm
from scratch; although, according to my preliinary tests, they should be
able to downgrade their connection from utf8mb4 to utf8mb3 without
issue.

In addition, we upgrade to mysql 8.1.0. Among many other fixes, this
avoids a server restart after the upgrade:

> An in-place upgrade from MySQL 5.7 to MySQL 8.0, without a server
> restart, could result in unexpected errors when executing queries on
> tables. This fix eliminates the need to restart the server between the
> upgrade and queries. (Bug #35410528)

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-34.html

See also the 8.1.0 release notes:

https://dev.mysql.com/doc/relnotes/mysql/8.1/en/news-8-1-0.html

Close #887.
2023-08-16 19:01:41 +02:00
0x29a df07422adb fix: race condition could cause mkdirs() to fail with "dir exists" 2023-08-16 18:59:15 +02:00
Régis Behmo 67009fb857 fix: improve support of non-buildkit Docker build
See comment here:
https://github.com/overhangio/tutor/pull/868#issuecomment-1640429396

See also the conversation that spawned this PR:
https://discuss.openedx.org/t/issue-in-tutor-palm-release-with-tuotr-dev-launch-while-installing/10629
2023-08-16 18:56:59 +02:00
Régis Behmo a6338e2880 feat: upgrade to open-release/palm.2 2023-08-09 22:41:34 +02:00
Overhang.IO 1e0f71450a Merge remote-tracking branch 'origin/master' into nightly 2023-08-03 09:43:18 +00:00
Régis Behmo 63c8f8ec58 feat: add support for http/3
It was observed that waiting time was cut in half after http/3 was
enabled. Plus, supporting http/3 is super easy :)

Close #845
2023-08-03 10:59:43 +02:00
Régis Behmo d7eb539277 fix: ignore discussion units when forum is not enabled
This is a backport of a commit to the master branch:
https://github.com/openedx/edx-platform/pull/32464

In particular, it will fix many issues that appear when the demo course
is imported.
2023-07-31 16:00:18 +02:00
Régis Behmo 78ba4ea7cf fix: don't apply edx-platform patches in nightly 2023-07-28 21:58:10 +02:00
Overhang.IO 82eeca8f57 Merge remote-tracking branch 'origin/master' into nightly 2023-07-28 19:32:12 +00:00
Régis Behmo a1945245b8 security: fix unprivileged content libraries creation
See:
https://github.com/openedx/edx-platform/security/advisories/GHSA-3q74-3rfh-g37j
https://github.com/openedx/edx-platform/pull/32838
https://discuss.openedx.org/t/security-upcoming-security-release-for-edx-platform-on-2023-07-25/10769
2023-07-28 21:04:26 +02:00
Régis Behmo 98d7532d0d fix: copy-node-modules error with buildx 2023-07-21 12:00:25 +02:00
Kyle D. McCormick e4ddee2604 build: copy in copy-node-modules.sh for npm post-install hook
This post-install hook replaces `openedx-assets npm`.

Part of: https://github.com/openedx/edx-platform/issues/31604
2023-07-21 11:23:57 +02:00
Overhang.IO bfd09fa61d Merge remote-tracking branch 'origin/master' into nightly 2023-06-22 11:13:19 +00:00
Régis Behmo 41eddd813c fix: mysql deployment on k8s
The `--ignore-db-dir` option is no longer supported on MySQL 8. See:
https://dev.mysql.com/doc/refman/8.0/en/upgrade-prerequisites.html

This option was causing the mysql container to fail.
2023-06-22 12:57:46 +02:00
Régis Behmo c575422d9c Merge branch 'master' into nightly 2023-06-14 22:49:05 +02:00
Régis Behmo 42f7819374 v16.0.0 2023-06-14 21:08:49 +02:00
Régis Behmo 189bfb2a7a feat: upgrade mongodb to 4.4
This is for
https://github.com/openedx/wg-build-test-release/issues/288

Note that we also upgrade mongodb from 4.0 to 4.2, because somehow this
hasn't been done in olive.
2023-06-14 21:08:49 +02:00