Linked Epic: https://github.com/overhangio/tutor/issues/1251
Some new rules that have been added are:
I: sort imports
N: check for pep8-naming standards
W292: check for missing extra line at EOF
Some of our lines, particularly in config, break the 88 character line length limit. For that, we add a # noqa: E501 to let ruff know to ignore the rule for that line
Superset was running on 2247 port in dev mode and on 8000 in local mode
We now make this consistent so that superset runs on 2247 in both local and dev
* fix: don't add cairn-postgresql as a dependency when CAIRN_RUN_POSTGRESQL is false
* fix: don't manage cairn-clickhouse permissions CAIRN_RUN_CLICKHOUSE is false
* fix: add missing CAIRN_POSTGRESQL_HOST and CAIRN_POSTGRESQL_PORT settings to allow usage with external postgresql DBs
The default URL to run a local platform switched from local.edly.io to
local.openedx.io. This changes makes it clearer for everyone that Tutor
is to run Open edX.
See: https://github.com/overhangio/tutor/issues/1120
With the latest Docker upgrade, we got the following warnings during
build:
FromAsCasing: 'as' and 'FROM' keywords' casing do not match
LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format
When running `do cairn-createuser`, the created db did not have the
right name. If the user had been created earlier with SSO, then the
Clickhouse DB did not exist.
This upgrade includes SSO login. Finally! We can now login to Superset
via the LMS. Thanks to OARS for providing the base security manager
implementation!
CI was failing during `apt update` with the following error:
E: The repository 'https://repo.clickhouse.com/deb/stable main/ Release' does not have a Release file.
Note that this error was occurring in the UK and Germany, but not in
France.
Clickhouse client command was triggering a permission denied error:
$ tutor local run cairn-clickhouse cairn-client
Code: 586. DB::ErrnoException: Cannot create file:
//.clickhouse-client-history, errno: 13, strerror: Permission denied.
(CANNOT_CREATE_FILE)
Traceback (most recent call last):
File "/scripts/cairn", line 161, in <module>
main()
File "/scripts/cairn", line 62, in main
args.func(args)
File "/scripts/cairn", line 68, in command_client
subprocess.check_call(get_client_command())
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['clickhouse', 'client',
'--host', 'cairn-clickhouse', '--port', '9000', '--user', 'openedx',
'--password', 'xrIDmynTAiDuJeVZc5ar', '--multiline', '--multiquery',
'--database', 'openedx']' returned non-zero exit status 74.
This was because the home of the cairn client was set to "/".
"Course completion" was causing browser crashes when it attempted to display
10k course items (which is the maximum allowed). Displaying 10000 bars does not
make sense anyway, so we threshold this number to 100.
Superset was ignoring the cairn-redis container, so we decided to remove it.
But the superset celery worker was writing to the /0 database, which conflicts
with the default celery database from the lms/cms. We fix this issue by running
in a different database.
The CELERY_RESULT_BACKEND seemed to be completely useless, so we got rid of it.
When creating a new user, but with an email address already associated
to a different user, the `cairn createuser` script crashes with an
obscure error. This slightly improves the error messsage.
See: https://discuss.openedx.org/t/cairn-password-reset/8226
This is necessary for some customers who are not using the
common.djangoapps.track.shim.LegacyFieldMappingProcessor in
settings.EVENT_TRACKING_BACKENDS.
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/151https://github.com/xzkostyan/clickhouse-sqlalchemy/issues/140
This is preventing us from creating datasets from physical tables.