Skip to content

Java code generation fails due to a 120s timeout — timeout setting seems not applied #4131

@rendaman0215

Description

@rendaman0215

GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!)

none

Commands

buf generate proto --template buf.gen.java.yaml --debug --timeout 5m

Output

DEBUG	buffetch termination
        found	{"curDirPath":"Users/XXX/go/src/github.com/XXX/XXX/proto","path":"UUsers/XXX/go/src/github.com/XXX/XXX/proto"}
DEBUG	buffetch termination found	{"curDirPath":".","path":"."}
DEBUG	targeting workspace based on v2 buf.yaml	{"subDirPath":"."}
DEBUG	github.com/bufbuild/buf/private/buf/bufworkspace.(*workspaceProvider).getWorkspaceForBucketBufYAMLV2	{"duration":"13.917µs"}
DEBUG	github.com/bufbuild/buf/private/buf/bufctl.(*controller).getWorkspaceForSourceRef	{"duration":"533.958µs"}
DEBUG	module data store dir read write bucket	{"moduleFullName":"buf.build/bufbuild/protovalidate","commitID":"c923a0c2a1324d8b9db81effea973b9c","dirPath":"b5/buf.build/bufbuild/protovalidate/c923a0c2a1324d8b9db81effea973b9c"}
DEBUG	module data store get module.yaml	{"moduleFullName":"buf.build/bufbuild/protovalidate","commitID":"c923a0c2a1324d8b9db81effea973b9c","found":true}
DEBUG	module data store dir read write bucket	{"moduleFullName":"buf.build/googleapis/googleapis","commitID":"61b203b9a9164be9a834f58c37be6f62","dirPath":"b5/buf.build/googleapis/googleapis/61b203b9a9164be9a834f58c37be6f62"}
DEBUG	module data store get module.yaml	{"moduleFullName":"buf.build/googleapis/googleapis","commitID":"61b203b9a9164be9a834f58c37be6f62","found":true}
DEBUG	module data store dir read write bucket	{"moduleFullName":"buf.build/protocolbuffers/wellknowntypes","commitID":"3ddd61d1f53d485abd3d3a2b47a62b8e","dirPath":"b5/buf.build/protocolbuffers/wellknowntypes/3ddd61d1f53d485abd3d3a2b47a62b8e"}
DEBUG	module data store get module.yaml	{"moduleFullName":"buf.build/protocolbuffers/wellknowntypes","commitID":"3ddd61d1f53d485abd3d3a2b47a62b8e","found":true}
DEBUG	github.com/bufbuild/buf/private/bufpkg/bufimage.BuildImage	{"duration":"364.154833ms"}

DEBUG	buf.alpha.registry.v1alpha1.CodeGenerationService/GenerateCode	{"duration":"2m2.897706209s","status":"deadline_exceeded","net.peer.name":"buf.build","rpc.system":"connect","message.sent.uncompressed_size":5875110,"message.received.uncompressed_size":0}
Failure: deadline_exceeded: failed to build with image reference "oci-registry.bufd.svc.cluster.local:5000/protocolbuffers/java@sha256:2136a1bcb9eb5bc70ab65233498b3123e4cdde8b4ad9aae71d5681488c50358d": attaching and running container: run: docker exited with context error: context deadline exceeded

Expected Output

Java code generation should respect the timeout setting (or have no timeout if not configured).

Anything else?

When generating Java code, the process times out after about 120 seconds.
From looking at the code in this repository, it seems that the timeout configuration is not actually being applied.
However, in practice, the code generation consistently fails at around 120s.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions