-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
In what area(s)?
/area runtime
What version of Dapr?
edge: v1.7.0-rc.4-504-g032581df-dirty
Expected Behavior
While invoking GetMetadata through GRPC, the contents of the registeredComponents
field should be non-empty and match what is returned by the corresponding HTTP API:
The HTTP response:
{
"id": "my-metadata-app",
"actors": [],
"extended": {
"cliPID": "20746",
"daprRuntimeVersion": "edge"
},
"components": [
{
"name": "lockstore",
"type": "lock.redis",
"version": "",
"capabilities": []
},
{
"name": "pubsub",
"type": "pubsub.redis",
"version": "v1",
"capabilities": []
},
{
"name": "statestore",
"type": "state.redis",
"version": "v1",
"capabilities": [
"ETAG",
"TRANSACTIONAL",
"QUERY_API",
"ACTOR"
]
}
]
}
Actual Behavior
Right now, with the current HEAD
of dapr/dapr, this is the returned GetMetadataReponse
comes with no registered_components
entries:
id: "my-metadata-app"
extended_metadata {
key: "daprRuntimeVersion"
value: "edge"
}
extended_metadata {
key: "is-this-our-metadata-example"
value: "yes"
}
Notice the absence of any registered_components
object in the response.
Steps to Reproduce the Problem
-
Override your ~/.dapr/bin/dapr with the a fresh build from dapr/dapr
-
Use the setup from
examples/metadata
from Metadata API support for Python GRPC clients. python-sdk#446 -
Instrument Python SDK client code to output the returned
GetMetadataResponse
protobuf object as-is:--- a/dapr/clients/grpc/client.py +++ b/dapr/clients/grpc/client.py @@ -1137,6 +1137,7 @@ class DaprGrpcClient: """ _resp, call = self._stub.GetMetadata.with_call(GrpcEmpty()) response: api_v1.GetMetadataResponse = _resp # type alias + print(response) # Convert to more pythonic formats active_actors_count = { type_count.type: type_count.count
-
Run the code as pointed out in `examples/metadata/README.md:
cd examples/metadata dapr run --app-id=my-metadata-app --app-protocol grpc --components-path components/ python3 app.py
-
At this point you observed the problem with the GRPC endpoint.
-
To baseline this problem, we also need to retrieve the result of the Metadata API using its HTTP endpoint. Start dapr with HTTP using the same components path :
# In the same directory you just ran the code above dapr run --app-id=my-metadata-app --dapr-http-port=3500 --components-path components/
-
and retrieve the metadata:
curl http://localhost:3500/v1.0/metadata | jq
-
Notice the difference in the number of returned components.
Release Note
RELEASE NOTE: FIX Fix missing registered_components
in GRPC Metadata API