Skip to content

Commit

Permalink
Fixes #362.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrowndotje committed Dec 10, 2024
1 parent 0ef815a commit 1d6cda2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.2.1 (10th December 2024)

- structurizr-core: Fixes https://github.com/structurizr/java/issues/362 (Ordering of replicated relationships in deployment environment is non-deterministic).

## 3.2.0 (6th December 2024)

- structurizr-dsl: Adds support for `element!=` expressions.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ signing.secretKeyRingFile=/some/path
ossrhUsername=username
ossrhPassword=password

version=3.2.0
version=3.2.1
Original file line number Diff line number Diff line change
Expand Up @@ -902,12 +902,11 @@ private void replicateElementRelationships(StaticStructureElementInstance elemen
StaticStructureElement element = elementInstance.getElement();

// find all StaticStructureElementInstance objects in the same deployment environment and deployment group
Set<StaticStructureElementInstance> elementInstances = getElements().stream()
TreeSet<StaticStructureElementInstance> elementInstances = getElements().stream()
.filter(e -> e instanceof StaticStructureElementInstance)
.map(e -> (StaticStructureElementInstance)e)
.map(e -> (StaticStructureElementInstance) e)
.filter(ssei -> ssei.getEnvironment().equals(elementInstance.getEnvironment()))
.filter(ssei -> ssei.inSameDeploymentGroup(elementInstance))
.collect(Collectors.toSet());
.filter(ssei -> ssei.inSameDeploymentGroup(elementInstance)).collect(Collectors.toCollection(TreeSet::new));

// and replicate the relationships to/from the element instance
for (StaticStructureElementInstance ssei : elementInstances) {
Expand Down

0 comments on commit 1d6cda2

Please sign in to comment.