-
Notifications
You must be signed in to change notification settings - Fork 9
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: adds endpoints for fetchGuestToken #27
Conversation
* generate_superset_context : adds a superset_guest_token_url to the context * generate_superset_token : called when ^ hit instead of on render. * adds a plugin url and view * removes superset_token from the context * adds/updates tests
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:
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. |
Hi @Ian2012 @bmtcril This is a draft PR because I haven't been able to load this branch into tutor dev to test it properly, but I'll rebuild tonight and start dealing with all the TODOs tomorrow. Also, there's something up with celery during the tests -- I had to add a bunch of |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
test_settings.py
Outdated
"auth_user": { | ||
"module": "django.contrib.auth.models", | ||
"model": "User", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this model to the settings causes the issues with Celery. For testing, there is no need to configure this model, you can mock the user or permissions. However I think you can disable Celery with CELERY_ALWAYS_EAGER.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that, no luck :( Will have another go today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some fixes for the crsf token and the bug with the reverse method: #28
Disconnecting these signal handlers during tests prevents errors like: kombu.exceptions.OperationalError: [Errno 111] Connection refused
…r permissions Replaces the function-based view with a DRF view that: * enforces session authentication * enforces course staff/instructor role Also reverts unneeded changes from previous commits.
to raise an exception instead of returning a tuple. Adds tests to improve test coverage
to the superset token view
so that reverse("platform_plugin_aspects:superset_guest_token") works whether we're in standalone tests or a plugin to the platform.
Thank you for your fixes @Ian2012 , I'm getting there.. hope to have this ready for your review tomorrow. |
* generate_superset_context expects a course_id * superset_guest_token_url should be absolute to LMS * CSRF cookie fix from #28 * XBlock uses handler instead of view * view handles Superset server errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and removes unneeded code
Thank you for your fixes @Ian2012 . I'm still unable to get this running in my dev stack, but I fixed the tests. |
@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. |
Closes #23
Testing instructions
Merge checklist:
Check off if complete or not applicable: