Azure / Azure/azure-functions-host
Remove custom conversion code in TableEntityConverter
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
We had to write our own custom code to convert objects into table entities ([TableEntityConverter.ToEntity](https://github.com/Azure/azure-functions-host/blob/82638e5f08700f9620f6141dc85ab142c848d505/src/WebJobs.Script.WebHost/Scale/TableEntityConverter.cs#L16)). However in later versions of the Azure Storage SDK they now provide [TableEntity.Flatten](https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.table.tableentity.flatten?view=azure-dotnet) and [TableEntity.ConvertBack](https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.table.tableentity.convertback?view=azure-dotnet) which we should use instead to avoid issues like this in the future. We've already had to deal with two bugs in this code: https://github.com/Azure/azure-functions-host/pull/6913 and https://github.com/Azure/azure-functions-host/pull/6539.
To ensure backwards compat, we just need to be sure that the new methods are using compatible types, to ensure that any existing persisted data can be read by the new code.
Contributor guide
Assessment
This issue has not been assessed yet.