googleforgames/open-match

The tutorials cannot generate the docker images if the protobuf definitions changed

Closed this issue · 3 comments

What happened:
I updated the protobuf definitions in order to test some functionality, and tried to test it via matchmaker101 tutorial.
However, the protobuf changes are not detected by the docker build step, even though the go build command runs successfully locally.

What you expected to happen:
I expected to be able to generate a docker image with the changes I made on the protobuf definitions.

How to reproduce it (as minimally and precisely as possible):

  • Define a new message in extensions.proto file.
  • Refer to this new message in one of the go files, e.g. /tutorials/matchmaker101/matchfunction/mmf/matchfunction.go
  • Run the below docker command to build the image and observe the error.
    docker build -t $REGISTRY/mm101-tutorial-matchfunction .

Anything else we need to know?:

Output of kubectl version:
Client Version: v1.28.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.3

Cloud Provider/Platform (AKS, GKE, Minikube etc.):
Minikube

Open Match Release Version:
1.8.1

Install Method(yaml/helm):
yaml

Can you give a bit more details on what you're trying to add to the proto, and what you're aiming to accomplish with the change?

For example I added the below model to the extensions.proto file.

message LatencyMap {
  map<string, int32> latencies = 1;
}

By doing that, I intend to pass the client latency map along with the Ticket, so that match function can evaluate the matches based on that information.

The extensions field in the ticket is the intended way to handle this sort of data. (Source file link). So put a map<string, map<string, int32> into the extensions field of your ticket with the string key 'latencies', and retrieve it in your MMF.