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

[Developer Experience] Missing/invalid signal/query makes the CLI simply return context canceld #83

Open
macnibblet opened this issue Dec 16, 2024 · 3 comments

Comments

@macnibblet
Copy link

macnibblet commented Dec 16, 2024

Sample Proto

service ContextCanceldExample {
  rpc DoSomething(google.protobuf.Empty) returns (google.protobuf.Empty) {
    option (temporal.v1.workflow) = {
      id: 'context-canceled-example',

      signal: {ref: "CancelWorkflow"},
    };
  }
}

Current developer experience

buf generate
Failure: context canceled

Expected experience

buf generate
Error: there is no matching rpc method for the signal CancelWorkflow in the workflow DoSomething
@cludden
Copy link
Owner

cludden commented Dec 19, 2024

This should already be handled, and I haven't been able to replicate this issue, when I try:

Failure: plugin protoc-gen-go_temporal: workflow  "mycompany.simple.Simple.SomeWorkflow1" references undefined signal: "mycompany.simple.Simple.UndefinedSignal"

Can you provide any more details about your configuration (e.g. versions of buf, protoc-gen-go, protoc-gen-go-temporal)

@macnibblet
Copy link
Author

Buf version: 1.48.0

protoc-gen-go --version
protoc-gen-go v1.34.2
protoc-gen-go_temporal --version
protoc-gen-go-temporal: dev
go: go1.23.2

buf.lock

# Generated by buf. DO NOT EDIT.
version: v2
deps:
  - name: buf.build/cludden/protoc-gen-go-temporal
    commit: 74c5da82fab44686aa2d1605f0f81d50
    digest: b5:4b8e6dcf9d594d1182cb7259b3346b7226a6cf185e01f28c1015a41dbb46c990f5612c1da3fb45dca8eebf5835e6a6b92986952d4973359bc613c6dd4a101340
  - name: buf.build/nvxx/protopatch
    commit: ef95e8420acb4e438d230a2f05895d78
    digest: b5:9850d3835fb74d7c4f9a3bbc656485602e7c1c25eaa98706b316c8af896db255aa1f9cb71d42a3656b200390b1e2c86d91bb8b7453775b921b46e47a0a031a23

buf.gen.yml

version: v2
managed:
  enabled: true
  disable:
    - file_option: go_package
      module: buf.build/cludden/protoc-gen-go-temporal

inputs:
  - module: buf.build/cludden/protoc-gen-go-temporal:main
  - directory: protobuf/

plugins:
  - remote: buf.build/protocolbuffers/go
    out: protobuf/
    opt: paths=source_relative

  - remote: buf.build/protocolbuffers/python
    out: src/python/protobuf/

  - remote: buf.build/protocolbuffers/pyi
    out: src/python/protobuf/

  - local: protoc-gen-go_temporal
    out: protobuf/
    opt: paths=source_relative,enable-patch-support=true
    strategy: all

@cludden
Copy link
Owner

cludden commented Dec 20, 2024

I'm wondering if you need to update your dependency versions? It's hard to say, since the go install method doesn't contain any version details at the moment.

test/issue-83/proto/test/issue83/issue83.proto

syntax = "proto3";

package test.issue83;

import "google/protobuf/empty.proto";
import "temporal/v1/temporal.proto";

service ContextCanceldExample {
  rpc DoSomething(google.protobuf.Empty) returns (google.protobuf.Empty) {
    option (temporal.v1.workflow) = {
      id: 'context-canceled-example',

      signal: {ref: "CancelWorkflow"},
    };
  }
}

protoc-gen-go

$ protoc-gen-go --version
protoc-gen-go v1.36.0

protoc-gen-go_temporal

$ protoc-gen-go_temporal --version
protoc-gen-go-temporal: 1.14.4
go: go1.21.13
$ buf generate
Failure: plugin protoc-gen-go_temporal: workflow  "test.issue83.ContextCanceldExample.DoSomething" references undefined signal: "test.issue83.ContextCanceldExample.CancelWorkflow"
plugin protoc-gen-go-patch: context canceled

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

No branches or pull requests

2 participants