Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add debug to rpc.Exchange to investigate bug #46

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion featureflags/graph/proto_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def variable(self, obj, value):
obj.variable.Variable = value.ident.hex

def operator(self, obj, value):
obj.operator = value.to_pb()
if value is not None:
obj.operator = value.to_pb()

def value_string(self, obj, value):
if value is not None:
Expand Down
21 changes: 20 additions & 1 deletion featureflags/rpc/servicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,26 @@ async def Exchange(self, stream: Stream) -> None: # noqa: N802
db_engine=self._db_engine,
session=user_session.get(),
)
populate_result_proto(result, exchange_reply.result)
try:
log.debug(
"Graph result: %r",
result.__idx__,
extra={
"project_name": request.project,
"request_verion": request.version,
"project_version": version,
},
)
populate_result_proto(result, exchange_reply.result)
except: # noqa
log.error(
"Failed to populate result proto",
extra={
"project_name": request.project,
"request_verion": request.version,
"project_version": version,
},
)

exchange_reply.version = version

Expand Down
Loading