feat: xblock metadata provider in taxonomy support - #3692
Conversation
|
Thanks for the pull request, @navinkarkera! 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. |
8a3a256 to
d9f2431
Compare
|
@azanbinzahid - could you please take a look at this and allow tests to run? |
Hi @mphilbrick211, apologies for the inconvenience. Team, please take a look @ansabgillani @DawoudSheraz @Ali-D-Akbar |
| taxonomy-connector @ git+https://github.com/open-craft/taxonomy-connector.git@5b9fedcc5c68370f3de5d49e18aae72d0d8226ad | ||
| # FIXME: remove this once a new tag is pushed in taxaonomy-connector |
There was a problem hiding this comment.
Temporarily added this to make CI/CD work.
Note to self: Remove this and update to latest taxonomy version before merge
@DawoudSheraz @Ali-D-Akbar @ansabgillani Apologies, could you please allow the tests to run again. It was missing this change.
There was a problem hiding this comment.
@ansabgillani Thank you! Although it did not work as CI is using local.txt which I missed to update. Please run the tests again. Sorry.
There was a problem hiding this comment.
The tests have been run. Do you have the access to taxonomy-connector to release a new version? If not, I can get this released so you can run make upgrade to update the version for taxonomy-connector. Just let me know about it.
There was a problem hiding this comment.
@Ali-D-Akbar Thank you! Fixed commit lint issue as well as a failing test (although this was working locally, lets see if the change works).
Do you have the access to taxonomy-connector to release a new version? If not, I can get this released so you can run make upgrade to update the version for taxonomy-connector. Just let me know about it.
I don't have the access to create new versions, but we are in discussion with @irfanuddinahmad and @sameenfatima78 for taxonomy-connector MR. Maybe you guys can coordinate and release. Thank you for your help.
There was a problem hiding this comment.
@navinkarkera We'll need to merge the PR in taxonomy-connector first before merging and releasing a new version here.
There was a problem hiding this comment.
@sameenfatima78 Yes, I meant releasing a new version in taxonomy-connector.
There was a problem hiding this comment.
Ah okay, I can take care of that if you don't have access right now.
c983097 to
13850e6
Compare
farhaanbukhsh
left a comment
There was a problem hiding this comment.
I am still trying to test on local devstack but there are few comments which I could get while reading the code :)
|
Hey @navinkarkera thank you for the amazing work, I am trying to test the code with the instructions you provided and I am getting LMS logs I am using the key that is fetched in the |
|
@farhaanbukhsh This seems like an issue with course-blocks API. Anyway, the |
farhaanbukhsh
left a comment
There was a problem hiding this comment.
👍
I have added a few nits, but over all the PR looks good.
- ✅ I tested this: by running and testing the provider locally on the devstack.
- ✅ I read through the code
- ❌ I checked for accessibility issues
- ❌ Includes documentation
- ❌ I made sure any change in configuration variables is reflected in the corresponding client's
configuration-securerepository.
6b073b3 to
7b0fa21
Compare
|
Hi @ansabgillani! Could you please take a look at this and allow tests to run? |
|
@navinkarkera looks like you have branch conflicts that need to be resolved to push this through. |
7b0fa21 to
7a8bc89
Compare
|
@mphilbrick211 @ansabgillani @sameenfatima78 This is now ready for merge (checked all required items in pre-merge checklist). |
7a8bc89 to
24571dd
Compare
|
@DawoudSheraz @Ali-D-Akbar Can you please help merge this MR. |
24571dd to
2f64860
Compare
2f64860 to
59f61fd
Compare
|
@DawoudSheraz @Ali-D-Akbar @mphilbrick211 @ansabgillani Please merge this MR if no further changes are required. |
1dff86c to
6d29eb4
Compare
|
Hi @navinkarkera! We're looking into having tests enabled for you. |
|
Hi @navinkarkera! Your tests were enabled, but you have some that failed and will need to be re-run. You'll also need to rebase to resolve the branch date issue. |
6d29eb4 to
aed9dcc
Compare
aed9dcc to
f9317eb
Compare
@mphilbrick211 Thanks you. Fixed the quality issues, but the test is passing locally and it has no relation to this MR. Please re-run the tests. |
|
Hi @navinkarkera - I am unable to run the tests, but I believe you should be able to. If you are running into issues, please let me know. |
f9317eb to
97cdc1c
Compare
|
@mphilbrick211 I can only rebase with master but the workflow needs approval. |
I have given Approve and Run on this PR before. Not sure why it is asking again. |
97cdc1c to
0ba60b5
Compare
|
@DawoudSheraz Thank you. But the master was updated and I had to rebase again. Someone would need to approve it again (till my MR is merged each run of workflow requires approval). |
| 'block-v1:edX+DemoX+Demo_Course+type@video+block@0b9e39477cf34507a7a48f74be381fdd', | ||
| 'block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_0270f6de40fc', | ||
| ] | ||
| resource = 'api/courses/v1/blocks/' |
There was a problem hiding this comment.
you can add a settings/constants variable for this. This has been used in client file too.
DawoudSheraz
left a comment
There was a problem hiding this comment.
A few nits, but overall good. A question: how/where will this be used? The blocks API is an important and sometimes expensive API. I am just wondering how often LMS will be hit to get blocks data.
test: add tests for xblock provider and block api refactor: lint issues and change api param refactor: make xblock supported types configurable refactor: use default partner id if available refactor: use block metadata api to fetch text content test: fix xblock provider test refactor: docstrings and conditions refactor: replace double quotes with single quotes refactor: extract vertical and video child blocks from given list of xblocks chore: upgrade deps for taxonomy-connector fix: preserve content text order fix: handle none values in index_dictionary
0ba60b5 to
01aa707
Compare
@DawoudSheraz Whenever a block is published and when we run |
|
@navinkarkera 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |




Description
Implements
XBlockMetadataProviderbased onabstract XBlockMetadataProviderfrom openedx/taxonomy-connector#119 in taxonomy/providers/xblock_metadata.py. Utilizesindex_dictionaryfrom course blocks api added in openedx/openedx-platform#31273 to fetch text representation of xblock.Currently the provider supports
videoandverticalblock types, configured viaTAXONOMY_XBLOCK_SUPPORTED_TYPESsetting. It combinesindex_dictionarytext from all children blocks.Supporting information
Private-ref: BB-6887Testing instructions
lmsanddiscoveryservice in devstack usingmake lms-up discovery-uphttps://github.com/open-craft/taxonomy-connectorin<devstack-base-dir>/src/make discovery-shell./manage.py migrate./manage.py shellPre-merge checklist
taxonomy-connectorin requirements (already updated as part of c0d4f28)