Closed ryou90 closed 1 year ago
APP_PORT
is not a supported setting in this SDK. There is HTTP_APP_PORT
and GRPC_APP_PORT
.
I updated the open PR for this issue to instead throw an AttributeError
whenever you try to access a property that is not implemented.
EDIT: Your issue was filed correctly - I got confused because I looked at the PR that was opened first (thought it was from you, but was from someone else). The updates I made to that PR should give you exactly what you want -- an AttributeError
for properties that don't exist / are not supported.
Expected Behavior
I want to retrieve an env variable from the dapr.config.settings class. If the variable is not present, an attribute error should be issued.
E.g.
Actual Behavior
When the variable not exists, a maximum recursion error is thrown and not a attribute error. This happens because the settings class use getattr method to lookup for non existing env variables. Within the method, getattr(..) is called, which caused a new recursive call.
The problem can be easily solved by removing the getattr method.
Steps to Reproduce the Problem
Test example code.
Release Note
RELEASE NOTE: Fix RecursionError when calling non-existing env variable from settings class