Repository navigation
fix: draw nested boundaries inside their parent with ignoreUnused - #393
Open
G26karthik wants to merge 1 commit into
Open
G26karthik wants to merge 1 commit into
G26karthik wants to merge 1 commit into
Conversation
With ignoreUnused=True, _get_elements_and_boundaries added the source's and sink's boundary to the boundaries set but not to the elements, so Boundary.dfd() never found a nested boundary and drew it at the top level. v1.3.1 added both; restore that.
This branch has not been deployed
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.
With
ignoreUnused=True, a boundary nested in another boundary is drawn outside its parent in the DFD. For example, withdmz = Boundary("dmz", inBoundary=net)and a server indmz,netis drawn as an empty cluster anddmzas a separate top-level cluster._get_elements_and_boundariesadds the source's and sink's boundary toboundariesand their parents toelements, but not the boundary itself.Boundary.dfd()finds its child clusters throughTM._elements, sonetnever findsdmz. v1.3.1 added both boundaries (elements.add(e.source.inBoundary)and the same for the sink); they were lost in 1.4.0. This puts the two lines back, which also matches the default mode, where every boundary is inTM._elements.The new test in
tests/test_pytmfunc.pybuilds that model withignoreUnused=Trueand checks thatdmz's cluster is nested one level insidenet's. It fails on master and passes with the change;tests/test_pytmfunc.pyandtests/test_stale_paths.pyotherwise give the same results as before (the four DFD comparison tests fail on Windows on master too, because of\in the image paths).I found no existing issue or PR for this.