7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-17 04:42:21 +00:00
Commit Graph

1663 Commits

Author SHA1 Message Date
Régis Behmo
11b2091e32 depr: halt compatibility with python 3.7 2023-06-14 19:40:58 +02:00
Régis Behmo
2d6b9c1767 feat: hide TOS link during registration
Registering a user was causing a 400 error because the LMS expected the
TOS checkbox to be checked, but it's not displayed in the frontend. So
we just disable it.

Close https://github.com/openedx/wg-build-test-release/issues/262
2023-06-14 19:40:58 +02:00
Régis Behmo
6dbb5baf81 feat: importdemocourse --repo-dir=... option
This allows us to run:

    tutor local do importdemocourse --repo=https://github.com/openedx/openedx-test-course --version=open-release/palm.master --repo-dir=test-course/course
2023-06-14 19:40:58 +02:00
Régis Behmo
b3c3c4a2cc feat: upgrade to Palm
Among other changes: ORA2 file uploads were stored in a folder named
"SET-ME-PLEASE (ex.  bucket-name)" (sigh). With this change, the folder
should be automatically renamed to "openedxuploads". This issue has been
occuring since June 2019... (sigh²)

Close #707
2023-06-14 19:40:58 +02:00
Régis Behmo
253b69ffe3 feat: faster builds with registry cache
Automatically pull Docker build cache from remote registry. This
considerably improves build performances, as discovered here:
https://github.com/overhangio/test-docker-build/
2023-06-14 19:40:58 +02:00
Régis Behmo
5c426257fb ci: run on macOS-11 because there no more github runners for macOS 10
Jobs are no longer being picked up:
https://github.com/overhangio/tutor/actions/runs/5259868936/jobs/9515592636
2023-06-14 09:41:44 +02:00
Régis Behmo
b8747996c9 fix: scriv error during github release
See:
https://github.com/overhangio/tutor/actions/runs/5260213022/jobs/9506811909#step:9:33

`scriv github-release --repo=overhangio/tutor` causes the following
error:

	Traceback (most recent call last):
	  File "/opt/hostedtoolcache/Python/3.7.16/x64/bin/scriv", line 8, in
	<module>
	    sys.exit(cli())
	  File
	"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/click/core.py",
	line 1130, in __call__
	    return self.main(*args, **kwargs)
	  File
	"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/click/core.py",
	line 1055, in main
	    rv = self.invoke(ctx)
	  File
	"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/click/core.py",
	line 1657, in invoke
	    return _process_result(sub_ctx.command.invoke(sub_ctx))
	  File
	"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/click/core.py",
	line 1404, in invoke
	    return ctx.invoke(self.callback, **ctx.params)
	  File
	"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/click/core.py",
	line 760, in invoke
	    return __callback(*args, **kwargs)
	  File
	"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/scriv/ghrel.py",
	line 99, in github_release
	    config=scriv.config,
	  File
	"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/jinja2/environment.py",
	line 1301, in render
	    self.environment.handle_exception()
	  File
	"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/jinja2/environment.py",
	line 936, in handle_exception
	    raise rewrite_traceback_stack(source=source)
	  File "<template>", line 3, in top-level template code
	TypeError: 'Version' object is not subscriptable
2023-06-14 09:38:07 +02:00
Régis Behmo
9d2c1f134c v15.3.7 2023-06-13 10:21:55 +02:00
Florian Haas
30d3ba3ba8 chore: Bump MongoDB default to version 4.2.24
Bump the default image reference for MongoDB from 4.2.17 to 4.2.24, to
address a critical issue present in versions 4.2.0 through 4.2.23.

References:
https://www.mongodb.com/docs/manual/release-notes/4.2/#patch-releases
https://jira.mongodb.org/browse/WT-10461

Fixes #854.
2023-06-13 10:10:53 +02:00
Régis Behmo
fb15f21bf5 chore: upgrade requirements
Resolve vulnerability detected in this automated PR:
https://github.com/overhangio/tutor/pull/840
2023-06-06 15:30:37 +02:00
Emad Rad
9fa04be2a3 doc: changelog entry created 2023-06-06 15:15:23 +02:00
Emad Rad
86f846aba3 feat: Add support for loading in-cluster config when running inside a pod
in some cases, tutor might run inside a pod, which that pod has access to a cluster via role binding and a service account. this way, there's no ./kube/config file, but kubectl commands run with no issue.

Close #843
2023-06-06 15:14:52 +02:00
Johan Castiblanco
4bb8671f26 fix!: use correct case for authsource mongo
Update `authSource`  keyword argument to  `authsource`

Authsource was configurated in camelcase.
https://github.com/overhangio/tutor/blob/master/tutor/templates/apps/openedx/settings/partials/common_all.py#L16
Something I think is ok because pymongo uses it in camelcase.
https://pymongo.readthedocs.io/en/3.10.1/api/pymongo/mongo_client.html

However, the error was presented because edx-platform use another variable when credentials are provided **(LOWERCASE)**.
https://github.com/openedx/edx-platform/blob/master/xmodule/mongo_utils.py#L72

Looking more ,  the `auth_source `is configured with another key name:  `authsource` **(LOWERCASE)** from the kwargs.
https://github.com/openedx/edx-platform/blob/master/xmodule/mongo_utils.py#L34

This won't change the **kwargs behavior of the camelCase in pymongo `MongoClient` because pymongo has a caseInsentive method.
https://github.com/mongodb/mongo-python-driver/blob/3.12.3/pymongo/mongo_client.py#L651
 ``it's  OK to pass `authsource` instead of authSource as a keyword argument.``
2023-05-29 15:53:36 +02:00
Régis Behmo
93688e18a1 ci: improve compatibility with main & nightly 2023-05-29 11:18:13 +02:00
Brian Mesick
87ae658773 docs: Update Google Analytics example to GA4 2023-05-26 16:04:04 +02:00
Régis Behmo
185a13a2e1 v15.3.6 2023-05-22 18:17:34 +02:00
Régis Behmo
2233c3422a feat: upgrade to open-release/olive.4 2023-05-22 18:16:39 +02:00
Régis Behmo
de0093aa8d fix: build-time warning
Installing from source triggers a warning on pip 23.0.1 if
pyproject.toml is not present. Building does not require any special
dependencies, so we just add a simple pyproject.toml file.

Close #836
2023-05-17 10:29:32 +02:00
Régis Behmo
f042ca9b90 docs: fix ENV_PATCHES example 2023-05-16 12:03:38 +02:00
Kyle McCormick
2e276cbb09 docs: explain why docker-compose.jobs.yml exists
Based on:
https://github.com/overhangio/tutor/issues/642#issuecomment-1483970113
2023-05-03 17:51:13 +02:00
Régis Behmo
6771732414 ci: fix dependency caching 2023-04-28 11:15:01 +02:00
Régis Behmo
5c5cd266f2 ci: allow manual trigger of "release" action
This is useful when the generation of a macOS binary has failed, for
instance.

In addition, we restore checking for the `gh` utility. This is necessary
when running CI locally with `act`.

In addition, we cache pip dependencies on github release and test runs.
2023-04-28 11:11:49 +02:00
Régis Behmo
35efd44a0e ci: fix gh release command 2023-04-28 09:33:41 +02:00
Régis Behmo
a302acc228 v15.3.5 2023-04-28 08:20:44 +02:00
Régis Behmo
19016b8ab1 feat: add do sqlshell command
An optional `--db=openedx` argument can be passed to the job command.

This should close
https://github.com/openedx/wg-developer-experience/issues/51
2023-04-26 10:36:13 +02:00
Régis Behmo
6257c1c7ac feat: improve edx-platform logging by silencing a few warnings
These warnings were occurring when launching a django shell ("shell"
command) or a development server ("runserver").
2023-04-26 10:36:13 +02:00
Régis Behmo
586045143f feat: add a do print-edx-platform-setting command
The command is pretty straightforward, but quite convenient.
2023-04-26 10:36:13 +02:00
Régis Behmo
b3c5c9685b feat: custom importable courses
This makes it possible to import courses not just from the demo repo.

Close #730
2023-04-26 10:36:13 +02:00
Régis Behmo
9feab4c0c3 ci: don't bother checking for presence of gh 2023-04-13 16:24:24 +02:00
Régis Behmo
ef0384d6ff ci: fix tutor version in installation instructions 2023-04-13 16:23:02 +02:00
Régis Behmo
a392a93bdd v15.3.4 2023-04-13 15:15:47 +02:00
Braden MacDonald
d7ed08110f docs: Update ARM64 tutorial 2023-04-13 15:03:57 +02:00
Régis Behmo
b02c4b93bb docs: add missing changelog entry 2023-04-13 08:32:40 +02:00
Régis Behmo
0887691cc4
feat: upgrade to open-release/olive.3 2023-04-12 21:46:04 +02:00
Régis Behmo
cb29a86a65 docs: fix nutmeg-related instructions 2023-04-12 10:36:18 +02:00
Régis Behmo
679fe5f86b v15.3.3 2023-03-22 10:10:08 -04:00
Régis Behmo
3377ffc38a fix: v0 plugin patch ordering
v0 plugin patches were directly added to ENV_PATCH, while v1 patches
were added to ENV_PATCHES. ENV_PATCHES items are forwarded to ENV_PATCH
later at runtime, which means that yaml plugin patches were always
loaded before v1 patches.

This was causing weird ordering issues, as discussed here:
https://discuss.openedx.org/t/using-mfe-config-to-set-logo-trademark-url-for-the-footer-component-in-olive/9578
2023-03-20 16:15:12 +01:00
Régis Behmo
fa9e86e188 improvement: COPY dockerize for faster build
Dockerize now ships with multi-arch Docker images, so we can just
COPY the binary from these images. This allows us to skip an image
layer.
2023-03-20 14:20:30 +01:00
Régis Behmo
28dce8c51a improvement: customisable docker build command
This paves the way for `docker buildx build` and better caching.

For instance, with this change you can try out the following plugin,
which should make image building much faster in CI:
https://gist.github.com/regisb/4049622ec4b48cbd48c89ec708dc5252
(not ready for production just yet, we still need to build and push the
images)
2023-03-20 14:20:30 +01:00
Régis Behmo
ff5357cdc0 improvement: faster build with npm ci 2023-03-20 14:20:30 +01:00
Régis Behmo
f42abe18ad feat: highlight enabled plugins with
In the output of `plugins list` it's difficult to see which plugins are
enabled at a glance. This change adds a more visible checkmark to the
output.

Ex:

	$ tutor plugins list
	NAME            STATUS          VERSION
	cairn            enabled      15.0.3
	discovery       installed       15.0.0
	ecommerce       installed       15.0.1
	forum           installed       14.0.0
	mfe              enabled      15.0.5
	minio           installed       15.1.0
2023-03-20 14:19:44 +01:00
Kyle McCormick
f984361d9c
feat: full edx-platform setup with tutor dev launch -m ...
Before this commit, setting up an edx-platform development environment
took multiple steps:

   tutor dev launch
   tutor dev run --mount=/path/to/edx-platform lms bash
   >> pip install -e .
   >> npm clean-install
   >> openedx-assets build --env=dev

This commit moves the steps under ``run`` into an init task, which
is automatically run by ``launch``. Thus, setup is now one command:

   tutor dev launch --mount=edx-platform

These extra init steps are only applicable when bind-mounting
edx-platform (because bind-mounting the repository overrides
some important artifacts that exist on the image, which must be
re-generated). Thus, the new init tasks exists early if it detects
that it is *not* operating on a bind-mounted repository.

Finally, we try to simplify the Open edX development docs so that
it is clearer how bind-mounting fits into the development process.

These bind-mounts:

* ../build/openedx/themes:/openedx/themes
* ../build/openedx/requirements:/openedx/requirements

existed in the dev lms and cms containers, but they did
not exist in the lms-job and cms-job containers.

This means that themes and requirements that were *built into the
image* would exist in the job containers, but live updates to the
themes and requirements would not apply.

To resolve this, we set ``volumes:`` on the lms-job and cms-job
services so that they match the volumes for the normal lms and
cms services.

Part of: https://github.com/openedx/wg-developer-experience/issues/146
Closes: https://github.com/openedx/wg-developer-experience/issues/152

This works around (but does not close) these related issues:
* https://github.com/openedx/wg-developer-experience/issues/150
* https://github.com/openedx/wg-developer-experience/issues/151
2023-03-15 13:31:49 +01:00
Moisés González
aac0355183 feat: configure uwsgi through an ini file 2023-03-15 11:19:22 +01:00
Kyle McCormick
2399909489 docs: clarify that extra pip requirements are a list, not a string 2023-03-14 18:09:13 +01:00
Kyle McCormick
732e0c43be fix: use dev image for tutor dev do, not prod image
The lms-job and cms-job services were configured to use
{{ DOCKER_IMAGE_OPENEDX }} rather than {{ DOCKER_IMAGE_OPENEDX_DEV }}.

This means that when running jobs in dev mode, a la:

    tutor dev do init

a production image would be used, to the user's surprise.
2023-03-14 09:56:35 +01:00
Régis Behmo
80b4820263 v15.3.2 2023-03-13 18:41:39 +01:00
Régis Behmo
4e7c3ee9fd
docs: troubleshoot high memory usage (#810)
On some OS, high ulimit causes some container to use a lot of memory. We
do not attempt to resolve this issue in Tutor because this is a
mysql/uwsgi issue. Instead, we explain how to resolve it in the
troubleshooting docs.

Close #671.
2023-03-10 11:20:21 +01:00
Moisés González
bfabdfc6c7 fix: add the missing UWSGI_WORKERS env variable to the k8s deployments 2023-03-10 11:19:50 +01:00
Maria Fernanda Magallanes Zubillaga
f13627a32a feat: add cli for listing available patches 2023-03-09 13:26:33 +01:00
Maria Grimaldi
a373e24b2c fix: use supported YouTube API for transcripts imports cherry-pick 2023-03-07 18:38:24 +01:00