Lower Tutor MFE version pin - #1089
Conversation
| ] | ||
| ) | ||
| # If PLUGIN_SLOTS doesn't exist, we are on Redwood and do not | ||
| # support in-context metrics. |
There was a problem hiding this comment.
and tutor-mfe version needed to support in-context metric is v19 and above.
There was a problem hiding this comment.
@farhaanbukhsh I think what I'd like to do is actually make the in-context feature toggleable across all versions but currently there doesn't seem to be a way to do that from inside the Tutor plugin (PLUGIN_SLOTS.add_items() and PLUGIN_SLOTS.add() are both called before we have the user settings which would tell us whether to add them or not.
It seems like we would have to add a runtime configuration that platform-plugin-aspects would use to determine what to do. Does that sound like the right approach to you, or is there something I'm missing?
There was a problem hiding this comment.
@bmtcril Let me try to understand what we are trying to do. We will create a toggle in platform-plugin-aspects, which opens up a toggle in-context API that determines if in-context metrics will be displayed or not.
Why do we need this?
The feature is still toggleable by ASPECTS_ENABLE_STUDIO_IN_CONTEXT_METRICS, but if you want to do it at the env.config.js level or PLUGIN_SLOTS level, maybe we can add a gate here, or we can eliminate the use of PLUGIN_SLOTS.add_item by writing directly to https://github.com/openedx/tutor-contrib-aspects/blob/643aeec1e56c3fc3e0851f34740b241de07ad448/tutoraspects/patches/mfe-env-config-runtime-definitions-authoring
But these will be done at build time and not at runtime.
Let me know if I am not able to understand something.
There was a problem hiding this comment.
Now that I think more about it, making this a runtime toggle solution doesn't seem to be straightforward. The decision needs to be taken in env,config.js or inside the plugin slots which doesn't seem to be a good solution.
There was a problem hiding this comment.
Thanks @farhaanbukhsh , ASPECTS_ENABLE_STUDIO_IN_CONTEXT_METRICS works fine even if it needs an mfe rebuild to take effect. One of the problems was that it wasn't plumbed all the way through platform-plugin-aspects, which should be fixed here: openedx/platform-plugin-aspects#163
I think between that PR and this one (with an upgrade of platform-plugin-aspects) it will allow older versions of both Aspects and Tutor (back to Redwood) to work as long as that flag is False.
There was a problem hiding this comment.
@bmtcril sounds right :) thank you for the amazing work.
Only in-context metrics requires mfe 19+ so we hope to be able to release a version that works back to Redwood and just doesn't support in-context metrics.
c8bc0b6 to
7ece8f5
Compare
7ece8f5 to
777038b
Compare
settings Allows platform-plugin-aspects to know whether to include in-context dashboards in the request for a Superset guest token. See: openedx/platform-plugin-aspects#163
baca11b to
1ee0d78
Compare
Brings in related bug fixes from platform-plugin-aspects.
1ee0d78 to
e69753c
Compare
Allow this plugin to be installed on Redwood and Sumac again. Previously the MFE version pin forced a Tutor upgrade to Teak or higher. Documentation updated to include more references to version compatibility.
Closes: #1088