Skip to content

Fix merge conflict in split_into_inserts_and_updates

Florian Spreckelsen requested to merge f-merge-conflict-id into dev

Summary

For https://gitlab.indiscale.com/caosdb/customers/leibniz-zmt/management/-/issues/133

Fixes https://gitlab.com/caosdb/caosdb-crawler/-/issues/39 whereby merge conflicts could arise when two otherwise identical records would have reference properties, one with resolved, one without a resolved id.

Focus

The fix is just checking for merge conflicts in crawl.Crawler.split_into_inserts_and_updates

Test Environment

Unittest should be sufficient.

To make sure that the unittest actually covers the faulty behavior install the crawler in dev and run

pytest -vvv unittests/test_issues.py::test_issue_39

from this branch and verify that this fails with the correct merge conflict.

Check List for the Author

Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines

  • All automated tests pass
  • Reference related issues
  • Up-to-date CHANGELOG.md (or not necessary)
  • Annotations in code (Gitlab comments)
    • Intent of new code
    • Problems with old code
    • Why this implementation?

Check List for the Reviewer

  • I understand the intent of this MR
  • All automated tests pass
  • Up-to-date CHANGELOG.md (or not necessary)
  • The test environment setup works and the intended behavior is reproducible in the test environment
  • In-code documentation and comments are up-to-date.
  • Check: Are there specifications? Are they satisfied?

For further good practices have a look at our review guidelines.

Edited by Henrik tom Wörden

Merge request reports

Loading