Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrates SupersetXBlock #7

Merged
merged 11 commits into from
Mar 13, 2024
Merged

feat: migrates SupersetXBlock #7

merged 11 commits into from
Mar 13, 2024

Conversation

pomegranited
Copy link
Contributor

@pomegranited pomegranited commented Mar 10, 2024

Description

Migrates the SupersetXBlock code from https://github.com/eduNEXT/platform-plugin-superset

and

  • use settings.SUPERSET_CONFIG instead of storing sensitive data in XBlock fields (superset_url, superset_username, superset_password)
  • modifies settings.SUPERSET_CONFIG to better distinguish between the (public) service_url and the (docker) internal_service_url
  • simplifies the XBlock by using StudioEditableXBlockMixin
  • removes unused code and files.

Also adds a "Go to Superset" link to the Instructor Dashboard, to allow users to navigate directly to Superset.

Testing instructions

See openedx/tutor-contrib-aspects#642 for manual testing instructions.

Screenshots

XBlock edit screen:

image

XBlock staff/instructor view:

image

XBlock learner view:

image

Instructor Dashboard "Go to Superset" link:

image

Merge checklist:
Check off if complete or not applicable:

  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Manual testing instructions provided
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

* use StudioEditableXBlockMixin
* removes sensitive Superset fields from XBlock -- use SUPERSET_CONFIG
* SUPERSET_CONFIG: distinguished between service_url and internal_service_url
* lets XBlock default to the instructor dashboard UUID, if configured
* extracts translated text
* denies access to Superset for non course staff
* removes unused code and files
* adds tests
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 10, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @pomegranited! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

requirements/doc.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@Ian2012 Ian2012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution! Looking great, just a couple of comments and a problem with a dependency

@pomegranited
Copy link
Contributor Author

Thank you for your review @Ian2012 ! If you're happy with my changes, feel free to merge & tag, and I'll update openedx/tutor-contrib-aspects#642 (comment)

@pomegranited pomegranited changed the title Jill/migrate xblock Migrates SupersetXBlock Mar 12, 2024
Copy link
Contributor

@bmtcril bmtcril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I'm excited to get this in! :)

Because the plugin's template is a mako template, also had to configure
i18n_tools to extract translations from mako templates.
@pomegranited
Copy link
Contributor Author

Hi @Ian2012 , I'm not sure why you're not seeing the XBlock in your course? Could you check that the installed version of platform-plugin-aspects matches this branch?

FYI I just pushed another commit to this branch. With this change, you should see a "Go to Superset" link on the Instructor Dashboard plugin.

@Ian2012 Ian2012 changed the title Migrates SupersetXBlock feat: migrates SupersetXBlock Mar 13, 2024
@Ian2012
Copy link
Contributor

Ian2012 commented Mar 13, 2024

Pushed a commit to fix this small bug in which the plugin was using the internal_service_url in production which cannot be allowed unless the allow insecure OAuth request which shouldn't be enabled in production:

image

@Ian2012 Ian2012 merged commit 7ee9182 into main Mar 13, 2024
9 checks passed
@Ian2012 Ian2012 deleted the jill/migrate-xblock branch March 13, 2024 19:39
@openedx-webhooks
Copy link

@pomegranited 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@pomegranited
Copy link
Contributor Author

@Ian2012 Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants