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 proto3 optional feature to protogen #119

Merged
merged 1 commit into from
May 9, 2023

Conversation

NikolayOskin
Copy link
Contributor

Added proto3 optional fields feature to protogen plugin

@robfraz
Copy link

robfraz commented Aug 30, 2022

Bump - would really like to see this feature get merged.

@aittam
Copy link

aittam commented Aug 30, 2022

This is great! We would love to see this change merged.

@Jbcampbe
Copy link

@jekiapp We would love to see support for optional fields merge as well. Is this PR still valid or should I create a new one with some changes?

@sejin-P
Copy link

sejin-P commented Apr 18, 2023

I think bumping up of protoc image version in gripmock is proper answer for this.

@jekiapp
Copy link
Contributor

jekiapp commented May 9, 2023

Hi guys sorry for a late reply, what is the motivation of this feature? I know it's just one line, but still it's not so obvious what the impact will be.

@jekiapp
Copy link
Contributor

jekiapp commented May 9, 2023

@NikolayOskin since the tests also not updated to prove this works, I need to do test it in local first. Updating the example tests would be helpful.

@jekiapp jekiapp merged commit cc0d60d into tokopedia:master May 9, 2023
@antonjim-te
Copy link

antonjim-te commented May 16, 2023

Hi @jekiapp
Using https://registry.hub.docker.com/layers/tkpd/gripmock/latest/images/sha256-a8b72b039d9b66e797b87b8ff0c4668cd6202ee934037d316cde310686491c22?context=explore I still see the error:

mock-grpc-service-1  | Starting GripMock
mock-grpc-service-1  | Serving stub admin on http://:4771
mock-grpc-service-1  | data/Test.proto: is a proto3 file that contains optional fields, but code generator protoc-gen-gripmock hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.--gripmock_out:
mock-grpc-service-1  | 2023/05/16 11:21:47 Fail on protoc exit status 1
mock-grpc-service-1 exited with code 1

My type is:

syntax = "proto3";

package data;

message Test {
  optional uint64 x = 1;
}

@jekiapp Could you take a look? @NikolayOskin is it working for you?
Thank you in advance.

@dezmoanded
Copy link

I'm getting the same error as above about protoc-gen-gripmock using the tkpd/gripmock:v1.12.1 image. Thank you.

@b0mbays
Copy link

b0mbays commented Jul 20, 2023

Bumping this, I'm getting the same error as above. Any progress on this?

is a proto3 file that contains optional fields, but code generator protoc-gen-gripmock hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.--gripmock_out:

@miklosbagi
Copy link

miklosbagi commented Oct 11, 2023

Well, this merge fixed it for me - but it's not part of the latest release as merge happened on May 9, and 1.12.1 dates back to Feb.

To leverage this fix, I've built from github, as we don't have this in dockerhub until the next release at least. Clone & docker build works.

Example docker-compose snippet:

version: "3.9"
services:
  gripmock:
    build:
      context: https://github.com/tokopedia/gripmock.git
    ports:
    ...

Hope that helps those running into this

@pablomarti
Copy link

Thank you @miklosbagi, that worked for me.

@mgerasimchuk
Copy link

@jekiapp could you please update the latest tag of the docker.com/r/tkpd/gripmock too?

@jekiapp
Copy link
Contributor

jekiapp commented Mar 15, 2024

please re-pull the latest image, just built the v1.13 and made it latest version.
https://hub.docker.com/layers/tkpd/gripmock/latest/images/sha256-e50455d0aef6d3691742e90e0c3296cee54d7e298571dac17b897d7f6e5b054c?context=repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.