Fix NamespaceSet.pop() removes item from all backends#514
Open
zrgt wants to merge 1 commit intoeclipse-basyx:developfrom
Open
Fix NamespaceSet.pop() removes item from all backends#514zrgt wants to merge 1 commit intoeclipse-basyx:developfrom
zrgt wants to merge 1 commit intoeclipse-basyx:developfrom
Conversation
pop() only removed item from first backend via popitem(), leaving stale entries in remaining backends and causing false AASConstraintViolation on subsequent add() for same semantic_id. Fixes eclipse-basyx#496
Member
|
Wait, this is nonsensical though, isn't it? Namespaces only ever identify via one attribute? I think here the class may have been misunderstood, which might mean, we did not implement them cleanly enough, but this is not a bug, as far as I can see. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NamespaceSet.pop()usedpopitem()on the first backend only, leaving stale entries in all remaining backends. Any subsequentadd()of an item with the samesemantic_idraised a falseAASConstraintViolation.Fix iterates all backends and removes the popped item's key from each.
Fixes #496
Test plan
test_namespaceset_pop_removes_from_all_backends— verifies pop then re-add with same semantic_id succeedstest.model.test_basesuite passes (53 tests)