Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support DefaultIdentificationHydrator in cosmosdb state component (#1121
) Follow-up to #1104 to support AD Auth codepath as well. `NewConfig()` and `NewConfigWithServicePrincipal()` both set the `Config.IdentificationHydrator` to the `DefaultIdentificationHydrator` in the underlying a8m/documentdb library. That implementation ends up calling `reflect.Value.Elem.FieldByName()`, which requires that the value passed to it is an interface or pointer, otherwise the Elem() call fails to dereference which causes a panic. cosmosdb.go passes the input to `UpsertDocument` by value today, which is eventually passed to the `DefaultIdentificationHydrator`, so changing the value passed to a pointer resolves the failure. Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
- Loading branch information