260 Commits

Author SHA1 Message Date
Régis Behmo
bab403c361 feat: Superset language
A nice language flag will be added to the superset sidebar when the
LMS/CMS have a different language.
2022-03-21 09:57:55 +01:00
Régis Behmo
ee3dbb912f harmonize setting names 2022-03-17 10:05:42 +01:00
Régis Behmo
45ffa3d11b docs: list all settings in readme 2022-03-17 09:48:03 +01:00
Régis Behmo
665c091dc9 v13.0.5 2022-03-10 17:54:00 +01:00
Régis Behmo
4161ff4f58 fix: permissions error when mounting custom migrations
See: https://discuss.overhang.io/t/custom-reg-form-extrainfo-does-not-exits-in-cairn/2508/8
2022-03-10 17:51:58 +01:00
Régis Behmo
82febd4ebb v13.0.4 2022-03-09 09:56:18 +01:00
Régis Behmo
2e28c5d551 fix: "unhealthy" superset containers
Superset container were reported as "unhealthy" because the healthcheck
was not testing the right port.
2022-03-09 09:55:41 +01:00
Régis Behmo
2adb2f57ed v13.0.3 2022-02-21 12:12:29 +01:00
Régis Behmo
b1f9cabed3 fix: chown: cannot read directory clickhouse error
The error was caused by the fact that the clickhouse container attempts to chown
the data directory.

See: https://discuss.overhang.io/t/cairn-clickhouse-failed/2414
2022-02-21 12:02:28 +01:00
Régis Behmo
88b8ac66c5 v13.0.2 2022-01-27 10:59:01 +01:00
Régis Behmo
8a4fd731f1 fix: k8s deployment securityContext syntax error 2022-01-27 10:59:01 +01:00
Régis Behmo
1f6db2a6ff docs: clarify that bootstrapping dashboard is necessary
This stems from a conversation with an actual end user.
2022-01-19 10:14:59 +01:00
Régis Behmo
19594df571 docs: add list of available metrics to readme 2022-01-07 12:28:45 +01:00
Régis Behmo
2e7f3d588d v13.0.1 2021-12-24 12:35:05 +01:00
Régis Behmo
5e53a77d3f fix: permissions of clickhouse job 2021-12-24 12:34:41 +01:00
Régis Behmo
54049ee28a feat: upgrade to maple 2021-12-20 22:44:40 +01:00
Régis Behmo
546a0cf8f7 feat: upgrade to maple 2021-12-13 08:39:39 +01:00
Régis Behmo
ca4c7908c3 v12.0.13 2021-11-25 12:52:38 +01:00
Régis Behmo
67a3b30553 fix: readme typo that breaks rendering 2021-11-25 12:52:12 +01:00
Régis Behmo
2cc4c5ae61 v12.0.12 2021-11-25 12:24:41 +01:00
Régis Behmo
1f6f16a9ce fix: dataset creation from physical table
We could not create datasets directly from physical tables. Turns out, this is
caused by the fact that reflection is enabled on the clickhouse databases in
Superset. To disable reflection, we manually specify the server version.

In the future, we must remove the server version from the database, and instead
specify engine_reflection=no in the DSN. We will be able to do that once a new
version of clickhouse-sqlalchemy has been released.

See:
https://github.com/xzkostyan/clickhouse-sqlalchemy/issues/151
https://github.com/xzkostyan/clickhouse-sqlalchemy/issues/140
This is preventing us from creating datasets from physical tables.
2021-11-25 12:21:31 +01:00
Régis Behmo
bf13620a2e feat: custom migrations 2021-11-25 11:39:01 +01:00
Régis Behmo
6871c16201 v12.0.11 2021-11-23 23:07:27 +01:00
Régis Behmo
f4fcb3f12c fix: 0008 migration 2021-11-23 23:07:07 +01:00
Régis Behmo
edf72be92b v12.0.10 2021-11-09 15:02:02 +01:00
Régis Behmo
b0b5dca52c fix: hide "openedx_*" tables by renaming to "_openedx_*"
The "openedx_*" tables were visible by end users, which was confusing.
2021-11-09 15:00:03 +01:00
Régis Behmo
752a84a27d v12.0.9 2021-08-30 16:24:06 +02:00
Régis Behmo
150a8afdee fix: TypeError with problem-builder units
Problem builder units sometimes have subunits with None titles, which causes
the importcoursedata.py script to crash with the following traceback:

    Traceback (most recent call last):
      File "/openedx/scripts/importcoursedata.py", line 95, in <module>
        main()
      File "/openedx/scripts/importcoursedata.py", line 32, in main
        import_course(course.id)
      File "/openedx/scripts/importcoursedata.py", line 40, in import_course
        values = [
      File "/openedx/scripts/importcoursedata.py", line 41, in <listcomp>
        sql_format(
      File "/openedx/scripts/importcoursedata.py", line 78, in sql_format
        args = [sql_escape_string(arg).decode() for arg in args]
      File "/openedx/scripts/importcoursedata.py", line 78, in <listcomp>
        args = [sql_escape_string(arg).decode() for arg in args]
    TypeError: a bytes-like object is required, not 'NoneType'

See: https://openedx.slack.com/archives/DRW9ECU66/p1628935843000600
2021-08-30 16:21:59 +02:00
Régis Behmo
972651e632 v12.0.8 2021-07-06 18:08:07 +02:00
Régis Behmo
d388edb5ee fix: show distinct user id count in course completion
Customer reported that there were 32k users in the visualization.
2021-07-06 18:07:20 +02:00
Régis Behmo
31c16832ca v12.0.7 2021-07-06 17:44:53 +02:00
Régis Behmo
c854c77df9 fix: don't add "pouac" suffix in default dashboard!!! 2021-07-06 17:44:14 +02:00
Régis Behmo
c733edcd3c fix: UnicodeEncodeError when sql query contains unicode
See:

    Traceback (most recent call last):
    File "/openedx/scripts/importcoursedata.py", line 95, in <module>
        main()
    File "/openedx/scripts/importcoursedata.py", line 32, in main
        import_course(course.id)
    File "/openedx/scripts/importcoursedata.py", line 66, in import_course
        make_query(insert_query)
    File "/openedx/scripts/importcoursedata.py", line 88, in make_query
        response = requests.post(clickhouse_uri, data=query)
    File "/openedx/venv/lib/python3.8/site-packages/requests/api.py", line 119, in post
        return request('post', url, data=data, json=json, **kwargs)
    File "/openedx/venv/lib/python3.8/site-packages/requests/api.py", line 61, in request
        return session.request(method=method, url=url, **kwargs)
    File "/openedx/venv/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
        resp = self.send(prep, **send_kwargs)
    File "/openedx/venv/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
        r = adapter.send(request, **kwargs)
    File "/openedx/venv/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
        resp = conn.urlopen(
    File "/openedx/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
        httplib_response = self._make_request(
    File "/openedx/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request
        conn.request(method, url, **httplib_request_kw)
    File "/openedx/venv/lib/python3.8/site-packages/urllib3/connection.py", line 234, in request
        super(HTTPConnection, self).request(method, url, body=body, headers=headers)
    File "/opt/pyenv/versions/3.8.6/lib/python3.8/http/client.py", line 1255, in request
        self._send_request(method, url, body, headers, encode_chunked)
    File "/opt/pyenv/versions/3.8.6/lib/python3.8/http/client.py", line 1300, in _send_request
        body = _encode(body, 'body')
    File "/opt/pyenv/versions/3.8.6/lib/python3.8/http/client.py", line 164, in _encode
        raise UnicodeEncodeError(
UnicodeEncodeError: 'latin-1' codec can't encode character '\U0001f6ab' in position 222493: Body ('🚫') is not valid Latin-1. Use body.encode('utf-8') if you want to send it encoded in UTF-8.
Error: Command failed with status 1: docker-compose -f /home/tutor/.local/share/tutor/env/local/docker-compose.yml -f /home/tutor/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /home/tutor/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm cairn-openedx-job sh -e -c python /openedx/scripts/importcoursedata.py
2021-07-06 17:39:06 +02:00
Régis Behmo
8c674c3d09 fix: tutor-openedx was renamed to tutor 2021-07-06 10:36:20 +02:00
Régis Behmo
e5b295479d v12.0.6 2021-07-05 09:26:24 +02:00
Régis Behmo
d5cb583fc4 feat: make it possible to collect past events 2021-07-05 09:26:02 +02:00
Régis Behmo
b7b1f3bd83 feat: add "average time in course" to dashboard 2021-06-23 11:40:48 +02:00
Régis Behmo
b7edf20181 v12.0.4 2021-06-14 15:00:32 +02:00
Régis Behmo
910a4cba83 fix: broken video segments
We sometimes end up with video segments where end_position < start_position,
resulting in negative viewing time. To address this, we discard invalid
segments.
2021-06-14 14:59:19 +02:00
Régis Behmo
8384491b52 add dashboard screenshots to readme 2021-06-14 11:11:51 +02:00
Régis Behmo
c64da5c24a feat: introduce "cairn migrate --fake"
Also, mount migration files in the clickhouse container for convenience.
2021-06-10 09:01:24 +02:00
Régis Behmo
7940f61c44 fix: broken migrations 2021-06-10 08:40:59 +02:00
Régis Behmo
6ed533258f upgrade to Lilac 2021-06-08 22:00:15 +02:00
Régis Behmo
cb99cb9242 improved README and fixed many things 2021-06-08 21:59:36 +02:00
Régis Behmo
e8d3008dea rename to cairn 2021-06-08 13:35:34 +02:00
Régis Behmo
a9f2f70f0d feat: k8s support \o/ 2021-06-08 12:27:12 +02:00
Régis Behmo
2b118a67ba multiple improvements
- new course overview comprehensive dashboard
- rename private tables to "_*"
- automatically detect tables with read access
- optional postgresql service
2021-06-03 10:48:31 +02:00
Régis Behmo
c2096efa72 Get rid of a few TODOs 2021-06-01 23:37:14 +02:00
Régis Behmo
2d1313f472 switch from redash to superset 2021-06-01 18:54:46 +02:00
Régis Behmo
0664b5208e fix: redash user creation
turns out, "filter" returns a "filter" object, and not a list.
2021-05-20 10:40:11 +02:00