Skip to content

Commit 4cfe98c

Browse files
committed
Merge branch 'fixing-multiple-branch-creation' of https://github.com/NiveditJain/exospherehost into fixing-multiple-branch-creation
2 parents 70a641b + fd91f21 commit 4cfe98c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

state-manager/app/models/db/state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def _generate_fingerprint(self):
3232
"run_id": self.run_id,
3333
"parents": {key: str(value) for key, value in self.parents.items()}
3434
}
35-
self._fingerprint = hashlib.sha256(json.dumps(data).encode()).hexdigest()
35+
self._fingerprint = hashlib.sha256(json.dumps(data, sort_keys=True).encode()).hexdigest()
3636

3737
@property
3838
def fingerprint(self):

state-manager/app/tasks/create_next_states.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ async def get_input_model(node_template: NodeTemplate) -> Type[BaseModel]:
239239
if len(new_unit_states) > 0:
240240
await State.insert_many(new_unit_states)
241241
except DuplicateKeyError:
242-
logger.error(f"Duplicate key error for new unit states: {new_unit_states}")
242+
logger.warning(f"Caught an expected duplicate key error for new unit states, likely due to a race condition: {new_unit_states}")
243243

244244
except Exception as e:
245245
await State.find(

0 commit comments

Comments
 (0)