edx-platform icon indicating copy to clipboard operation
edx-platform copied to clipboard

Allow tests for Extracted & Builtin LTI XBlock

Open ttqureshi opened this issue 1 year ago • 6 comments

This is the test PR for https://github.com/openedx/xblocks-contrib/pull/13

ttqureshi avatar Dec 12 '24 08:12 ttqureshi

@kdmccormick test_number_mongo_calls this test case is failing with the test params expecting 37 mongo calls as in 2nd, 3rd and 4th test case parameters.

With the flag (USE_EXTRACTED_LTI_BLOCK) set to True, 36 calls are made and thus assertion fails. I have tried to figure out the reason but couldn't get any clue.

I'm sharing the output diff here. Please take a look, and guide me what could be the possible way-outs.

cc: @feanil @farhan

ttqureshi avatar Apr 03 '25 13:04 ttqureshi

@ttqureshi

test_number_mongo_calls this test case is failing with the test params expecting 37 mongo calls as in 2nd, 3rd and 4th test case parameters.

  1. We are not adding the EmptyDataRawMixin in the extracted XBlock.
  2. EmptyDataRawMixin has data String field which is missing in the extracted XBlock
  3. This 1 less field is causing 1 less mongo DB call. So either a. add this data field for initial extraction to make exact code b. or decrease 1 count in test case

Note: I don't have technical depth of the mongo calls working, it needs to be explored

farhan avatar Apr 05 '25 07:04 farhan

@farhan Thanks for giving the pointers.

  1. We are not adding the EmptyDataRawMixin in the extracted XBlock.
  2. EmptyDataRawMixin has data String field which is missing in the extracted XBlock
  3. This 1 less field is causing 1 less mongo DB call. So either a. add this data field for initial extraction to make exact code b. or decrease 1 count in test case

Seems like this is causing the issue. Let me try things around first, and IMO decreasing the count by 1 in the test case (inside if condition) sounds more reasonable than adding extra data field that is not required anywhere in the extracted LTIBlock.

ttqureshi avatar Apr 07 '25 18:04 ttqureshi

Thanks for the pull request, @ttqureshi!

This repository is currently maintained by @openedx/wg-maintenance-edx-platform.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

:radio_button: Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
:radio_button: Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
:radio_button: Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

:radio_button: Update the status of your PR

Your PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate.


Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

:bulb: As a result it may take up to several weeks or months to complete a review and merge your PR.

openedx-webhooks avatar Sep 16 '25 08:09 openedx-webhooks

Hi @ttqureshi! Is this pull request still in progress?

mphilbrick211 avatar Nov 13 '25 22:11 mphilbrick211

@mphilbrick211 YES, it's a WIP. It is currently blocked on this. This is the new story for the #XBlock/823.

ttqureshi avatar Nov 14 '25 05:11 ttqureshi