What is the waffle flag text string value for enabling {lmshost}/api/user_tours/v1

The courseware micro front-end makes requests to this url: https://mooc.moocweb.com/api/user_tours/v1/mcdaniel, which apparently by default returns a 403 error. Researching this error I found the following in the source code:

But there is no guidance about how the waffle flag is supposed to be configured. Does anyone know?

Have you tried running the management command to backpopulate the user tours model?

See https://edx.readthedocs.io/projects/open-edx-release-notes/en/latest/nutmeg.html#user-tours

I haven’t seen anything about a waffle flag for user tours. If there is one, it should be annotated, so the documentation is generated in https://edx.readthedocs.io/projects/edx-platform-technical/en/latest/index.html

Peter Pinch
Senior Associate Director, Application Development
MIT Open Learning Engineering
pdpinch@mit.edu
he/him/his

Thanks @pdpinch that is helpful. Though it does not solve the problem at hand, i nevertheless learned about a couple of things that would have become problems. Related, i created a few tools today that bear on this topic:

  • tutor-contrib-enable-courseware-mfe - a tutor plugin that ensures that LMS courseware MFE is enabled.
  • tutor-contrib-disable-courseware-mfe - does the opposite. a tutor plugin to disable LMS courseware MFE
  • tutor-contrib-k8s-deploy-tasks - a tutor plugin that runs the manage.py tasks outlined in the Nutmeg release notes (your link). It also takes care of some k8s-specific deployment hurdles related to http/https settings values in some of the oauth client configurations for cms / discovery / ecommerce / etcetera.

I also created a pair of Github Actions for these in https://github.com/openedx-actions that simplify using these plugins inside of Github Actions workflows.

I just came to note for future searchers that somehow I had gotten myself into a state where I was seeing HTTP 404 errors on my Palm.Master server like the below:

lms-1                | [pid: 7|app: 0|req: 640/1851] 172.18.0.4 () {56 vars in 3106 bytes} [Wed May  8 11:36:40 2024] GET /api/user_tours/v1/testuser => generated 0 bytes in 50 msecs (HTTP/1.1 404) 8 headers in 425 bytes (1 switches on core 0)

These were preventing my testuser account from even getting into a class. Initially I added a django waffle switch of “user_tours.tours_disabled” per here Feature Toggles — edx-platform documentation. While that allowed the student to get to the course page, the 404s were still occurring in the background.

If anyone sees that in the future, the “backpopulate the user tours model” mentioned by @pdpinch , which is tutor local run lms ./manage.py lms backpopulate_user_tours worked to resolve those errors for me.

1 Like