openedx / openedx-learning

GNU Affero General Public License v3.0
5 stars 8 forks source link

fix: bug importing tags with the same value as an existing one #141

Closed rpenido closed 8 months ago

rpenido commented 8 months ago

https://github.com/openedx/modular-learning/issues/170

Description

If we try to import tags over a taxonomy that shares the same Tag Value, an error is thrown about the conflict tag value.

It can be reproduced by importing the Template Taxonomy over the "Lightcast Open Skills Taxonomy". Both taxonomies have a tag with the value "piano". In the plan, it tries to create the tag piano for the Template before deleting the one from Lightcast, raising an error.

This PR changes the order of the import actions, always running the DeleteTag actions before others to avoid this.

Testing Instructions

Please ensure that the tests cover the expected behavior.


Private-ref:

openedx-webhooks commented 8 months ago

Thanks for the pull request, @rpenido! 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.

rpenido commented 8 months ago

Should we merge #135 first?

They are independent. You could merge this first.

We will have a minor conflict anyway in the tests because:

I added a comment in the code that will conflict.

openedx-webhooks commented 8 months ago

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