7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-01 05:40:48 +00:00
Commit Graph

1066 Commits

Author SHA1 Message Date
Régis Behmo
6bf8bcdffe Fix encoding mode for binary files
Writing binary files triggered an error:

    ValueError: binary mode doesn't take an encoding argument
2020-11-14 12:25:21 +01:00
Régis Behmo
c35a0480e1 Fix minor formatting 2020-11-13 17:44:24 +01:00
Régis Behmo
a27c78fe1c Fix instructions for generating environment 2020-11-12 17:20:26 +01:00
Régis Behmo
daabbdc3b6 Simplify quickstart by using save.callback 2020-11-12 15:31:13 +01:00
Régis Behmo
b2fdaf604e Fix platform checking and env saving on Windows 2020-11-12 12:56:18 +01:00
Régis Behmo
2596e5f7d2 v10.4.1 (2020-11-11)
- [Bugfix] Fix dependency error during `pip install tutor` due to urllib3 incompatibility
- [Bugfix] Fix user ID checking under Windows.
- [Bugfix] Fix template rendering for Windows users.
- [Improvement] Switch to `bcrypt` for htpasswd password generation, for better portability on Windows.
- [Improvement] In the openedx production docker image, add some jitter to the gunicorn worker restart process to prevent all workers from restarting at the same time.
2020-11-11 10:39:58 +01:00
Régis Behmo
ad858cd699 Fix urllib3 dependency error on installation of tutor
requests depends on urllib3<1.26.0, while urllib3==1.26.0 was just
released. We need to introduce a constraint on urllib3 to avoid the
following error when running `pip install -e`:

    pkg_resources.ContextualVersionConflict: (urllib3 1.26.0
    (./venv/lib/python3.7/site-packages),
    Requirement.parse('urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1'),
    {'requests'})

 We will be able to remove this constraint once requests becomes
 compatible with urllib3==1.26.0. To test this change just run `pip
 install -e tutor` and then run a dummy command, such as `tutor local
 stop`.
2020-11-11 10:36:42 +01:00
Régis Behmo
6c4d9619fd Fix user ID checking under windows
This should make tutor portable on Windows. Well, if the `id -u` command
is supported at least...

See: https://github.com/overhangio/tutor/issues/381
2020-11-07 17:48:20 +01:00
Régis Behmo
998dec7149 Fix template name separator for Windows users
See: https://github.com/overhangio/tutor/issues/381
2020-11-07 16:37:43 +01:00
Régis Behmo
6848253b8e Switch from crypt to bcrypt for htpasswd generation
This is more portable, as described here:
https://github.com/overhangio/tutor/issues/381
2020-11-07 14:46:53 +01:00
Régis Behmo
02cc106af3 Add some jitter to the openedx gunicorn workers
This should prevent gunicorn workers from restarting all at the same
time.
2020-11-04 18:19:35 +01:00
Régis Behmo
91e647692a Add upgrade instructions for AMI users
AWS unhelpfully does not include upgrade instructions in the upgrade
email, so...
2020-11-03 10:19:04 +01:00
Régis Behmo
37a0576934 Fix logging instructions in troubleshooting docs 2020-11-02 08:58:20 +01:00
Régis Behmo
58ec1b9d79 v10.4.0 (2020-10-30)
- [Improvement] Mount config and setting files in read-only mode
- 💥[Improvement] Enable unit completion tracking by default.
- [Bugfix] Run `apt update` before `apt install` when installing deps in
the openedx Dockerfile
2020-10-30 18:20:19 +01:00
Régis Behmo
d978401155 Better error management in execute internal function 2020-10-30 18:20:19 +01:00
Régis Behmo
8d4bb1fc9e Upgrade all requirements after cryptography security release
See https://github.com/overhangio/tutor/pull/378
2020-10-27 23:53:51 +01:00
Régis Behmo
efee5b55cb Mount config and setting files in read-only mode
This is part of the process to get rid of as many writable mounts as
possible.
2020-10-25 18:44:54 +01:00
Régis Behmo
d8a4b26884 Enable unit completion tracking by default
See discussion:
https://discuss.overhang.io/t/course-not-starting/962/12
2020-10-22 15:24:40 +02:00
Rafael Sousa
dd0ab446a3 run apt update before installing deps 2020-10-19 17:51:13 +02:00
Régis Behmo
d2d5532386 Clarify forking instructions 2020-10-16 13:10:00 +02:00
Régis Behmo
ed14fb1746 v10.3.1 (2020-10-16)
- [Improvement] Make all commands considerably faster
- [Improvement] Make it easier to override Mongodb connection parameters
- [Bugfix] Add support for .woff and .woff2 font files in themes (thanks @mrtndwrd!)
2020-10-16 12:45:40 +02:00
Régis Behmo
7ed49e4716 Fix formatting according to newest black release 2020-10-15 17:33:28 +02:00
Régis Behmo
310dbe968a Upgrade pinned requirements 2020-10-15 17:20:27 +02:00
Régis Behmo
70023b0a51 Mark as compatible with python 3.9, 3.10 2020-10-15 16:45:43 +02:00
Régis Behmo
facc0b84e1 Make tutor considerably faster
Tutor was making many calls to iter_installed (~100 on my machine with a
dozen installed plugins). Turns out it's useless to cache Plugin and
Renderer instances, as the config keeps changing all the time. Instead,
we cache the list of installed plugins, which does not change in the
course of a single run.

On my machine this speeds up `tutor config save` by 5x, going from 7.5s
to 1.3s.
2020-10-15 16:28:55 +02:00
Régis Behmo
f32eb08940 Make it easier to override mongodb connection parameters
Pymongo clients can connect to Mongodb with many parameters
(https://pymongo.readthedocs.io/en/stable/api/pymongo/mongo_client.html#pymongo.mongo_client.MongoClient)
but we don't want to create a new Tutor setting for every one of them.
This makes it easy for users to override Mongodb connection parameters,
simply by modifying the `mongodb_parameters` object.
In particular, this makes it easy to add "replicaSet" connection
parameters.
See https://github.com/overhangio/tutor/pull/372
2020-10-15 14:35:41 +02:00
Régis Behmo
e17eede179 Add changelog entry for woff/woff2 change
See https://github.com/overhangio/tutor/pull/373
2020-10-15 14:29:27 +02:00
Régis Behmo
a004de5e68 Trim trailing spaces in auth.json 2020-10-15 14:28:18 +02:00
Régis Behmo
2ca62be52e Force running tests on creating release
This will help us detect early issues with the releases.
2020-10-15 14:28:18 +02:00
Maarten
1d67bb36e2 Support .woff and .woff2 file format for fonts
Right now if I add .woff or .woff2 fonts files to an Indigo-based theme's `lms/static/fonts` directory, I get the following error:

```
$ /indigo-folder# make
tutor config render --extra-config ./config-totem.yml ./theme "$(tutor config printroot)/env/build/openedx/themes/indigo-totem"
Error loading template lms/static/fonts/NotoSans-Bold.woff
Traceback (most recent call last):
  File "/home/maarten/.local/bin/tutor", line 8, in <module>
    sys.exit(main())
  File "/home/maarten/.local/lib/python3.8/site-packages/tutor/commands/cli.py", line 38, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/home/maarten/.local/lib/python3.8/site-packages/tutor/commands/config.py", line 86, in render
    renderer.render_all_to(dst)
  File "/home/maarten/.local/lib/python3.8/site-packages/tutor/env.py", line 153, in render_all_to
    rendered = self.render_file(template)
  File "/home/maarten/.local/lib/python3.8/site-packages/tutor/env.py", line 137, in render_file
    template = self.environment.get_template(path)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 175, in get_source
    contents = f.read().decode(self.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 10: invalid start byte
make: *** [Makefile:2: render] Error 1
```
2020-10-15 14:23:31 +02:00
Régis Behmo
dac7da4bae v10.3.0 (2020-10-13)
- 💥[Improvement] Simplify CORS configuration
2020-10-13 14:57:05 +02:00
Régis Behmo
2f7742b099 Simplify CORS configuration
CORS headers are no longer handled by nginx, but directly by the LMS.
This makes it possible by 3rd-party apps to easily add domain names to
the CORS whitelist, even when they are not subdomains of the LMS.
2020-10-13 13:34:12 +02:00
Régis Behmo
9f94a12c7d v10.2.4 (2020-10-06)
- [Bugfix] Fix Apache proxy configuration when HTTPS is enabled (#370)
2020-10-06 12:01:25 +02:00
Régis Behmo
9291b2e1b9 Fix Apache proxy configuration when HTTPS is enabled
Close #370
2020-10-06 12:00:38 +02:00
Régis Behmo
c3052aa34c Fix WEB_PROXY default value in docs 2020-10-06 11:04:42 +02:00
Régis Behmo
a11f803af5 Fix SAML plugin example in docs
See https://discuss.overhang.io/t/saml-authentication-not-working/975
2020-10-06 09:56:51 +02:00
Régis Behmo
0baddb15c2 Move to an included CI configuration file
This makes it easier to debug CI and does not pollute the repo with
useless commits.
2020-10-02 15:22:30 +02:00
Régis Behmo
e8e44f50b0 v10.2.3 (2020-10-02)
- [Feature] Add ``images printtag`` command
- [Improvement] Make it possible to override individual contact email
addresses with plugins
- [Bugfix] Replace "no-reply@LMS_BASE" email address by regular contact
email address
- [Bugfix] Disable learner records globally by default
- [Improvement] Upgrade to the latest release of MySQL 5.6
- [Improvement] Non-plugin settings added by "set" directives are now
automatically removed when the plugin is disabled (#241)
2020-10-02 14:18:52 +02:00
Régis Behmo
9d0f2d9178 Simplify CI
This comes after a big refactoring of our CI pipeline.
2020-10-02 14:17:29 +02:00
Régis Behmo
91c28a5de4 Fix undefined variable and pylint warnings 2020-10-02 13:02:10 +02:00
Régis Behmo
7b7f548dbd Switch "do not fuck this up" message to section
Admonitions are not supported by Github's rst parser.
2020-10-02 12:16:58 +02:00
Régis Behmo
026e0d6c89 Hey America! Please do not fuck this up. 2020-10-02 12:02:20 +02:00
Régis Behmo
ccee481dd0 Add images printtag command 2020-10-02 00:25:03 +02:00
Régis Behmo
baa06f27a7 De-duplicate image build/push/pull code 2020-10-02 00:14:06 +02:00
Régis Behmo
c8434d500f Fix no-reply email address in lms/cms 2020-10-01 13:41:28 +02:00
Régis Behmo
371b2b5c2d Disable learner records globally by default
Previously, platform administrators had to define a site configuration
to disable this feature.

See https://discuss.overhang.io/t/account-settings-is-not-working/967/3
2020-10-01 13:39:45 +02:00
Oleg Demakov
8c9ebe8512 configurable emails config settings 2020-10-01 13:39:14 +02:00
Régis Behmo
718a6a5cf9 Upgrade to the latest release of MySQL 5.6
Hopefully, this should resolve some initialisation issues.
2020-09-23 15:33:22 +02:00
Régis Behmo
82b06034f9 Add big fat warning about podman-compose 2020-09-21 10:35:36 +02:00
Florian Haas
0f50300ad6 doc: Add warning about docker-compose/podman-compose compatibility issues
Users appear to run into compatibility issues where podman-compose
does not behave exactly as docker-compose. Add a warning that those
issues exist, and that reports about them are welcome on the
Tutor Discourse.

Reference:
https://discuss.overhang.io/t/tutor-with-podman-not-working/905/2
2020-09-21 10:20:37 +02:00