-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
v1: Generated field mask is incorrect when field is of type map<string, string> #1488
Comments
Hi, can you test this against v2? The field map handling has been rewritten for v2. |
i'm afraid upgrading to v2 is causing all sorts of problems when trying to build and run the service:
not sure if i did anything strange but i don't think so, i just followed the instructions here |
Sorry, you may need to follow the v2 migration guide: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2/docs/_docs/v2-migration.md. It's not live on the docs page yet because v2 isn't stable yet. Chiefly, you'll need to upgrade your |
yep, seems i corrupted my dependencies somewhere along the way. redoing the whole thing and starting fresh i can compile and run without issues. as far as i can tell the fieldmasks now look correct so that's great. any idea when there will be a stable release of v2? i really rather need the fieldmask fix now but don't want to upgrade without any idea of how stable things are. are there any known major problems with v2? |
v2 is as good as ready to go, there are no major changes planned and no outstanding bugs (see #1223). The only outstanding thing is an external dependency, we're waiting for grpc-go to tag a release of |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
🐛 Bug Report
A message containing a map field that is read/write
map<string, string> data = 1
will cause an incorrect field mask to be generated when attempting to execute an update.
To Reproduce
Implement service and generate gateway per instructions.
Issue an update request on an existing resource:
A call to FieldMaskUtil.isValid on the generated proto will return false.
Expected behavior
The correct mapping of
update_mask
isActual Behavior
The generated mapping of
update_mask
isIt seems as though the field mask generation assumes that the
metadata
field always is a nested proto but as demonstrated this doesn't have to be the case.Your Environment
Running grpc gateway v. 1.14.3 but as far as I can see this behaviour exists in all newer versions too as
fieldmask.go
hasn't changed since last september.The text was updated successfully, but these errors were encountered: