Skip to content

Commit

Permalink
Local SDK wasn't loading referenced file (googleforgames#1509)
Browse files Browse the repository at this point in the history
Subtle bug in variable assignment caused the sdk server to not load a
GameServer yaml when passed in.

Closes googleforgames#1508

Co-authored-by: Alexander Apalikov <[email protected]>
  • Loading branch information
markmandel and aLekSer committed May 4, 2020
1 parent 2e884c3 commit 3fafa12
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion cmd/sdk-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ func main() {
func registerLocal(grpcServer *grpc.Server, ctlConf config) (func(), error) {
filePath := ""
if ctlConf.LocalFile != "" {
filePath, err := filepath.Abs(ctlConf.LocalFile)
var err error
filePath, err = filepath.Abs(ctlConf.LocalFile)
if err != nil {
return nil, err
}
Expand Down
4 changes: 1 addition & 3 deletions examples/cpp-simple/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ RUN cd cpp-simple && mkdir -p .build && \
FROM debian:stretch
RUN useradd -u 1000 -m server

COPY --from=builder /project/cpp-simple/.build/.bin/cpp-simple /home/server/cpp-simple
RUN chown -R server /home/server && \
chmod o+x /home/server/cpp-simple
COPY --from=builder --chown=server:server /project/cpp-simple/.build/.bin/cpp-simple /home/server/cpp-simple

USER 1000
ENTRYPOINT /home/server/cpp-simple
4 changes: 1 addition & 3 deletions examples/rust-simple/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ RUN make build
FROM debian:stretch
RUN useradd -u 1000 -m server

COPY --from=builder /home/builder/agones/examples/rust-simple/target/release/rust-simple /home/server/rust-simple
RUN chown -R server /home/server && \
chmod o+x /home/server/rust-simple
COPY --from=builder --chown=server:server /home/builder/agones/examples/rust-simple/target/release/rust-simple /home/server/rust-simple

USER 1000
ENTRYPOINT /home/server/rust-simple

0 comments on commit 3fafa12

Please sign in to comment.