Skip to content
Snippets Groups Projects

Detect infinite recursion in Entity.to_xml

Merged I. Nüske requested to merge f-bug-fit-96-print-recursion into dev
All threads resolved!

Summary

Addresses https://gitlab.indiscale.com/caosdb/customers/f-fit/management/-/issues/96 / https://gitlab.com/linkahead/linkahead-pylib/-/issues/73
When calling to_xml on an Entity that refers to itself, to_xml now detects the infinite recursion and stops after the first level of repeated information.

Focus

  • What is the likelihood that a version refers to itself (predecessor / successor)? Do we need to add the same functionality to Version.to_xml?
  • Does this change anything for Entities that could already successfully call to_xml before? Are there cases where this might break the communication with the server?

Test Environment

Manual Testing

Check List for the Author

  • All automated tests pass
  • Reference related issues
  • Up-to-date CHANGELOG.md (or not necessary)
  • Up-to-date JSON schema (or not necessary)
  • Appropriate user and developer documentation (or not necessary)
  • Annotations in code (Gitlab comments)

Check List for the Reviewer

  • I understand the intent of this MR
  • All automated tests pass
  • Up-to-date CHANGELOG.md (or not necessary)
  • Appropriate user and developer documentation (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?
Edited by Florian Spreckelsen

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • I. Nüske added 1 commit

    added 1 commit

    • a7847363 - MNT: Revert unwanted behaviour change introduced by bugfix in to_xml with lists of entities

    Compare with previous version

  • I. Nüske marked the checklist item Annotations in code (Gitlab comments) as completed

    marked the checklist item Annotations in code (Gitlab comments) as completed

  • I. Nüske requested review from @florian

    requested review from @florian

  • Florian Spreckelsen resolved all threads

    resolved all threads

  • added 1 commit

    • 8778db51 - DOC: Fix docstring and inline comment

    Compare with previous version

  • Florian Spreckelsen marked the checklist item I understand the intent of this MR as completed

    marked the checklist item I understand the intent of this MR as completed

  • Florian Spreckelsen marked the checklist item All automated tests pass as completed

    marked the checklist item All automated tests pass as completed

  • Florian Spreckelsen marked the checklist item Up-to-date CHANGELOG.md (or not necessary) as completed

    marked the checklist item Up-to-date CHANGELOG.md (or not necessary) as completed

  • Florian Spreckelsen marked the checklist item Appropriate user and developer documentation (or not necessary) as completed

    marked the checklist item Appropriate user and developer documentation (or not necessary) as completed

  • Florian Spreckelsen marked the checklist item In-code documentation and comments are up-to-date. as completed

    marked the checklist item In-code documentation and comments are up-to-date. as completed

  • added 9 commits

    Compare with previous version

  • Florian Spreckelsen marked the checklist item The test environment setup works and the intended behavior is reproducible in the test as completed

    marked the checklist item The test environment setup works and the intended behavior is reproducible in the test as completed

  • added 2 commits

    • 7c96253a - MAINT: Change ellipses to etree.Comment
    • 063d186f - TST: Test for XML comment text

    Compare with previous version

  • Florian Spreckelsen enabled an automatic merge when all merge checks for 063d186f pass

    enabled an automatic merge when all merge checks for 063d186f pass

  • mentioned in commit 2f7cb996

  • Please register or sign in to reply
    Loading