Hello!
I’m working on my first Tutor plugin, feat: adds superset docker services and open edx integrations by pomegranited · Pull Request #1 · open-craft/tutor-contrib-superset · GitHub, which sets up Apache Superset and allows users to use Open edX SSO to authenticate to the app.
To set up SSO, I need to know the full root LMS URL: e.g.
-
http://local.overhang.io:8000 in
tutor dev
, or -
http://local.overhang.io in
tutor local
.
The variable I’m trying to set is here: SUPERSET_OAUTH2_BASE_URL
I can get the base domain configured from LMS_HOST
, and I can figure out whether it’s http or https from ENABLE_HTTPS
. But I can’t seem to find the variable that tells me whether there’s a port that needs to be added to the hostname.
I’ve tried several things, but nothing has worked with the plugin.py script so far.
- The variable
JWT_COMMON_ISSUER
is available when my plugin.py is running, but it only contains the correct value when runningtutor local
; it doesn’t get the:8000
port appended fortutor dev
. - Variables like
LMS_ROOT_URL
orCOMPOSE_PROJECT_NAME
are not available when my plugin.py is running. - I’m adding patches to
ENV_PATCHES["local-docker-compose-services"]
, so I thought maybe there was anENV_PATCHES["dev-docker-compose-services"]
equivalent for dev – doesn’t seem to be? - I looked at other plugins like tutor-discovery and tutor-ecommerce, and they hardcode the LMS provider URL in their django dev/prod settings file templates. I can’t really do that with my plugin, because Superset doesn’t have a notion of running in dev vs prod environments.
How do other people solve this issue?