Skip to content

Conversation

@xitij2000
Copy link
Contributor

@xitij2000 xitij2000 commented Mar 13, 2019

Adds an inline status line while generating reports that reports progress. A continuation of https://github.com/edx/edx-platform/pull/18244

JIRA tickets: OSPR-3198

Discussions: https://github.com/edx/edx-platform/pull/18244

Screenshots:
Peek 2020-07-30 18-52

Previous version

Peek 2019-03-14 04-06

Sandbox URL:
LMS: https://pr19986.sandbox.opencraft.hosting/
Studio: https://studio.pr19986.sandbox.opencraft.hosting/

Merge deadline: None

Testing instructions:
TBD

Reviewers

  • edX reviewer[s] TBD

Settings

EDXAPP_FEATURES:
  ENABLE_COMBINED_LOGIN_REGISTRATION: true

@openedx-webhooks
Copy link

Thanks for the pull request, @xitij2000! I've created OSPR-3198 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams.

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

  • supporting documentation
  • edx-code email 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 still be done via the GitHub pull request interface. As a reminder, our process documentation is here.

@openedx-webhooks openedx-webhooks added needs triage open-source-contribution PR author is not from Axim or 2U labels Mar 13, 2019
@xitij2000 xitij2000 changed the title Kshitij/report status [WIP] Inline problem response report status Mar 13, 2019
@natabene
Copy link
Contributor

@xitij2000 Thank you for your contribution. Please let me know once it is ready to be looked at.

@openedx-webhooks openedx-webhooks added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed needs triage labels Mar 13, 2019
@xitij2000
Copy link
Contributor Author

xitij2000 commented Mar 13, 2019

@marcotuts I've attached a gif capture of the intended interface in the ticket. If this seems OK, I will polish it up a bit more.

(The sandbox is also available for testing)

@xitij2000
Copy link
Contributor Author

@natabene I'd love a rough look at this point to see if the proposed UI style is OK. If so I will go ahead and complete the implementation.

@natabene
Copy link
Contributor

@marcotuts Can you give this an early look?

@openedx-webhooks openedx-webhooks added product review PR requires product review before merging and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Mar 14, 2019
@marcotuts
Copy link
Contributor

This looks great! I have a few minor visual / UI tweaks and suggestions but it might be easier to draw out / visualize. By chance will you be at the conference in a few weeks? If not I'll reply back with a visual or summary of the minor suggestions. This is ok to move to engineering review next @natabene. This page needs a lot of overall work to simplify, but this is an incremental cleanup toward that direction.

@xitij2000
Copy link
Contributor Author

@marcotuts Yes, I will be at the conference.

I just wanted to show the general UX I was going for before finishing off details like padding etc. For one I'm not finding the progress text very useful, so I intended to remove that unless there is an error. Glad to know this is headed in the right direction!

@openedx-webhooks openedx-webhooks added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed product review PR requires product review before merging labels Mar 18, 2019
@xitij2000 xitij2000 force-pushed the kshitij/report-status branch 4 times, most recently from a092b66 to c1932c0 Compare April 6, 2019 00:28
@xitij2000 xitij2000 force-pushed the kshitij/report-status branch 2 times, most recently from 1d20ca9 to 9ad66a0 Compare April 11, 2019 06:40
@xitij2000
Copy link
Contributor Author

jenkins run js

@marcotuts
Copy link
Contributor

At the final step, it isn't entirely clear that you select the lowest level item by clicking the blue link. All the way up to this point you are able to block on a block / button.
image

Separately, I will connect with the team to get feedback on the component itself, but this seems to be a valuable step in the right direction for making problem selection easier.

@xitij2000
Copy link
Contributor Author

@marcotuts That selection mechanism was added quite a while back (https://github.com/edx/edx-platform/pull/17824) in this PR I'm just adding the live status and link below this UI.

That said, I'd be open to making improvements to this UI in a separate PR (or this one if it's a small enough change).

I also wonder how useful the text field with the block key is, perhaps it can be de-emphasised.

@natabene
Copy link
Contributor

@xitij2000 Can you let me know once all tests are green and this is ready for our review?

@xitij2000
Copy link
Contributor Author

@natabene I'm mainly waiting for the visual UI tweaks and suggestions for the inline status bit of the UI before I finalise this work.

@xitij2000
Copy link
Contributor Author

@marcotuts Would love some feedback on this so I can polish and finalise this.

@openedx-webhooks openedx-webhooks added product review PR requires product review before merging and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels May 6, 2019
@xitij2000 xitij2000 force-pushed the kshitij/report-status branch from 597c45f to 0efbeab Compare August 11, 2020 04:56
@xitij2000
Copy link
Contributor Author

jenkins run python-3.8/python

Copy link
Contributor

Choose a reason for hiding this comment

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

This may also not be needed anymore?

Copy link
Contributor

@bradenmacdonald bradenmacdonald left a comment

Choose a reason for hiding this comment

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

Was just going to approve but noticed some potential a11y issues when going through my checklist. Sorry for not spotting that earlier. Please consider them, squash in a fix, and get the tests green then I can approve + merge.

Adds an in-line status display for problem report generation progress.

Co-authored-by: Adam Kovari <adam@opencraft.com>
Co-authored-by: Eugeny Kolpakov <eugeny.kolpakov@gmail.com>
Co-authored-by: Kshitij Sobti <kshitij@sobti.in>
Co-authored-by: Braden MacDonald <braden@opencraft.com>
@xitij2000 xitij2000 force-pushed the kshitij/report-status branch from b8167b7 to 559ff54 Compare August 12, 2020 13:35
@edx-status-bot
Copy link

Your PR has finished running tests. There were no failures.

@xitij2000
Copy link
Contributor Author

@bradenmacdonald This is ready for review. I did not make any changes to the text input since it didn't make sense for a disabled input, but if you feel there are changes needed there, do tell.

Copy link
Contributor

@bradenmacdonald bradenmacdonald left a comment

Choose a reason for hiding this comment

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

👍

  • I tested this: on the sandbox
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation: n/a

@ormsbee ormsbee merged commit 5d33501 into openedx:master Aug 13, 2020
@openedx-webhooks
Copy link

@xitij2000 🎉 Your pull request was merged!

Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@xitij2000 xitij2000 deleted the kshitij/report-status branch August 13, 2020 21:44
@xitij2000
Copy link
Contributor Author

Thanks!

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

@DawoudSheraz
Copy link
Contributor

@xitij2000 Hi. Since the merge of this PR, we have been experiencing the issues in problem response CSV generation. There have been about 200 instances of the following error ever since this went live on production:

Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python3.5/contextlib.py", line 30, in inner
    return func(*args, **kwds)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/newrelic/hooks/framework_django.py", line 554, in wrapper
    return wrapped(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/views.py", line 80, in instructor_task_status
    output = _get_instructor_task_status(task_id)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/views.py", line 27, in _get_instructor_task_status
    instructor_task = get_updated_instructor_task(task_id)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/api_helper.py", line 292, in get_updated_instructor_task
    _update_instructor_task(instructor_task, result)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/api_helper.py", line 219, in _update_instructor_task
    task_output = InstructorTask.create_output_for_success(returned_result)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/models.py", line 151, in create_output_for_success
    raise ValueError(u"Length of task output is too long: {0}".format(json_output))
ValueError: Length of task output is too long: {"total": 1, "failed": 0, "skipped": -34, "step": "CSV uploaded", "succeeded": 35, "preassigned": 0, "action_name": "generated", "attempted": 35, "duration_ms": 901}

Can you please take a look and either fix/revert the PR? The feature is broken on the platform and is becoming a blocker. Let me know if you think otherwise. Thanks

@xitij2000
Copy link
Contributor Author

@DawoudSheraz I'm not sure how this PR could have affected this, and am a little confused by the error.

It seems to be thrown here: https://github.com/edx/edx-platform/blob/75495fd00314a42b7f27c81768f55ac7b18e5977/lms/djangoapps/instructor_task/models.py#L150-L151
It seems to be thrown if the task output is too long, but the output printed above is way smaller than 1024 characters.

This PR is mostly a UI change, and while it does add the report path to the tasks metadata, I don't see in the task output above. Would you have any context on what might be going on? I will look into fixing it accordingly.

@DawoudSheraz
Copy link
Contributor

@DawoudSheraz I'm not sure how this PR could have affected this, and am a little confused by the error.

It seems to be thrown here:

https://github.com/edx/edx-platform/blob/75495fd00314a42b7f27c81768f55ac7b18e5977/lms/djangoapps/instructor_task/models.py#L150-L151

It seems to be thrown if the task output is too long, but the output printed above is way smaller than 1024 characters.
This PR is mostly a UI change, and while it does add the report path to the tasks metadata, I don't see in the task output above. Would you have any context on what might be going on? I will look into fixing it accordingly.

@xitij2000 The task status on success now also includes key report_path, whose value is S3 temporary link. I had removed it from the traceback that I shared earlier. The link is very large and is resulting in server error when getting the resulting dict.

@xitij2000
Copy link
Contributor Author

@DawoudSheraz OK, that makes sense then. I will investigate an alternative approach to this to avoid needing that in the task output.

@DawoudSheraz
Copy link
Contributor

@xitij2000 Thanks.

@xitij2000
Copy link
Contributor Author

@DawoudSheraz I have a PR that fixes this: https://github.com/edx/edx-platform/pull/24867
I've removed the report path from the task output and am instead fetching it from a different API in the frontend.

@DawoudSheraz
Copy link
Contributor

@xitij2000 Thanks for the quick turnaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants