F update parents mitigation
Summary
This MR is a mitigation for #14 (moved) and updates changed parents before any other insertion / update transaction.
Focus
Note, that the (empty) dump was replaced by one with the new test_key.
Test Environment
See the failing tests in f-test-parent
. Please remove the branch once you checked it out (It was merged in this one).
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.
Merge request reports
Activity
requested review from @florian
assigned to @salexan
added 22 commits
-
55e62eac...acc3b20f - 21 commits from branch
dev
- 872bf344 - Merge branch 'dev' into f-update-parents-mitigation
-
55e62eac...acc3b20f - 21 commits from branch
requested review from @henrik
added 91 commits
-
872bf344...9039075d - 90 commits from branch
dev
- 7a4a8f32 - Merge branch 'dev' into f-update-parents-mitigation
-
872bf344...9039075d - 90 commits from branch
added 15 commits
-
7a4a8f32...3412582e - 13 commits from branch
dev
- 5682be3f - FIX: duplicate function definition removed
- 304b1bf0 - Merge branch 'dev' into f-update-parents-mitigation
-
7a4a8f32...3412582e - 13 commits from branch
I have had a look at the code, because currently one test related to security modes does not pass.
I think:
@staticmethod def execute_parent_updates_in_list(to_be_updated):
needs to be updated to use a similar method as "execute_updates_in_list":
- use
set_ids_and_datatype_of_parents_and_properties
properly - use something like
update_cache = UpdateCache() update_cache.insert(to_be_updated, run_id)
instead of
old_entity.update(unique=False)
.@henrik could you have a look? It's probably easy for you to adapt. Also documentation for these functions are missing.
- use
added 33 commits
-
304b1bf0...2151d699 - 32 commits from branch
dev
- b4f3416c - Merge branch 'dev' into f-update-parents-mitigation
-
304b1bf0...2151d699 - 32 commits from branch
added 64 commits
-
b4f3416c...d34f0bfa - 62 commits from branch
dev
- 8e9a9128 - MAINT: remove code duplication and honor security mode
- 5b9ca55f - Merge branch 'dev' into f-update-parents-mitigation
-
b4f3416c...d34f0bfa - 62 commits from branch
38 from caosdb.utils.register_tests import clear_database, set_test_key 39 set_test_key("10b128cf8a1372f30aa3697466bb55e76974e0c16a599bb44ace88f19c8f61e2") 41 40 42 41 DATADIR = os.path.join(os.path.dirname(__file__), "test_data", 43 42 "extroot", "use_case_simple_presentation") 44 43 45 44 46 @pytest.fixture 47 def clear_database(): 48 # TODO(fspreck): Remove once the corresponding advancedtools function can be 49 # used. 50 ents = db.execute_query("FIND ENTITY WITH ID>99") 51 if ents: 52 ents.delete() 53 54 changed this line in version 13 of the diff
- Resolved by Alexander Schlemmer
- Resolved by Alexander Schlemmer
- Resolved by Alexander Schlemmer
removed review request for @henrik
mentioned in commit db761bcb