microsoft / botbuilder-dotnet

Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.
https://github.com/Microsoft/botframework
MIT License
878 stars 484 forks source link

[#6768] CosmosDBKeyEscape.TruncateKeyIfNeeded return different value after compiled #6860

Closed ceciliaavila closed 1 week ago

ceciliaavila commented 1 month ago

Fixes #6768

Description

This PR implements a custom GetHashCode method to return the same hash code even on different bots' runs. This code is used in CosmosDBKeyEscape to truncate keys that are longer than 255 characters.

Specific Changes

Testing

These images compare the hash codes returned by the GetHashCode and GetDeterministicHashCode methods in two different bot runs. image