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

Support for Protobufs in CloudEvents #391

Closed
diezep opened this issue May 12, 2023 · 6 comments · Fixed by #408
Closed

Support for Protobufs in CloudEvents #391

diezep opened this issue May 12, 2023 · 6 comments · Fixed by #408
Assignees
Labels
kind/question Further information is requested

Comments

@diezep
Copy link

diezep commented May 12, 2023

I get this error when i trigger a cloud event in Cloud Run using application/protobuf as a event data content type

Bad request. Unsupported encoding "application/protobuf". Only "application/json" is supported. package:functions_framework/src/json_request_utils.dart 42 mustBeJson package:functions_framework/src/targets/cloud_event_targets.dart 90 _decodeBinary package:functions_framework/src/targets/cloud_event_targets.dart 66 _eventFromRequest package:functions_framework/src/targets/cloud_event_targets.dart 53 CloudEventWithContextFunctionTarget.handler package:functions_framework/src/run.dart 49 _forbiddenAssetMiddleware.<fn> package:functions_framework/src/logging.dart 171 cloudLoggingMiddleware.hostedLoggingMiddleware.<fn>.<fn> dart:async _CustomZone.runGuarded package:functions_framework/src/logging.dart 168 cloudLoggingMiddleware.hostedLoggingMiddleware

@kevmoo kevmoo added the kind/enhancement New feature or request label May 31, 2023
@kevmoo
Copy link
Collaborator

kevmoo commented May 31, 2023

We have no wired up proto support. Is this necessary?

@diezep
Copy link
Author

diezep commented May 31, 2023

We have no wired up proto support. Is this necessary?

I think it is @kevmoo. The new events from Firestore to trigger changes directly without cloud audit are only available with proto.

@diezep diezep changed the title Cloud Event and Protobufs Support for Protobufs in CloudEvents May 31, 2023
@kevmoo
Copy link
Collaborator

kevmoo commented Jun 15, 2023

Let me dig in there, @diezep !

@kevmoo kevmoo self-assigned this Jun 15, 2023
@kevmoo
Copy link
Collaborator

kevmoo commented Jun 15, 2023

@diezep – can you point me to documentation from cloud run about when/where/how to expect application/protobuf ?

@kevmoo kevmoo added kind/question Further information is requested and removed kind/enhancement New feature or request labels Jun 15, 2023
@diezep
Copy link
Author

diezep commented Jun 16, 2023

@diezep – can you point me to documentation from cloud run about when/where/how to expect application/protobuf ?

To be honest, I already searched for that before and didn't find anything about it. Not even how to handle that type of content.

kevmoo added a commit that referenced this issue Jun 21, 2023
kevmoo added a commit that referenced this issue Jun 21, 2023
kevmoo added a commit that referenced this issue Jun 21, 2023
Closes #391

Also improve efficiency of JSON decoding
kevmoo added a commit that referenced this issue Jun 21, 2023
Closes #391

Also improve efficiency of JSON decoding
@kevmoo
Copy link
Collaborator

kevmoo commented Jul 10, 2023

@diezep – see https://github.com/GoogleCloudPlatform/functions-framework-dart/tree/main/examples/protobuf_firestore ! 😄

(The readme was copy-pasted and not updated. Need to get on that!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants