zeebe-client 0.11.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c458c30ca89e870cabbead8c0672fdebe62969e28cdf031f64675240eddcb45
4
- data.tar.gz: 8c51e32007c3a18bd5adc20d52c6b0d26ae6068866684dec7c809202a92f65e8
3
+ metadata.gz: 17e37e552793b6e9da2af0ed06224a10c5c85aeb065b123621f7abe422b5101d
4
+ data.tar.gz: 4a0212f29f5d09c31dea91b8796d4f4ae3bff42e6ccfd5dc32eca97530a2b1fb
5
5
  SHA512:
6
- metadata.gz: 57cfbc109cc7624026c0a25b1ed7bd87281e6ee04d3f79b591a870715606d5c47c385eba2de63c9a8b6961cd75b1f0255cd622f3c634ff877f5626cd75638947
7
- data.tar.gz: 43aa739e75b8bd6123503e464f376f46569fb414ccdc472c04403eb0d535ad102b62ac20075cd38a865861f733e70c2df6d1216a17ed4cb6fe95a4213abb0256
6
+ metadata.gz: 134b6b5d876ce16dfeae427bd24e2b2a4afb8af2a2cf4b368911e3ff37076708d7aa5da911df2b9d7c5a05a774299cba8e15e5eea10deaef9b6f8574701b533f
7
+ data.tar.gz: abddb8c2325a6e4e01aade80b47f61cc9250b10dc9bc1a2463af272cac87e6f3e21440d5fcf418dc4c27e4eeec4946c9c855edbdfc26340b1a2c59d7cb345ff4
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: ci
3
+
4
+ on:
5
+ push:
6
+ branches: [master]
7
+ pull_request:
8
+ branches: [master]
9
+ workflow_dispatch:
10
+ schedule:
11
+ - cron: '55 4 * * 4' # weekly on thursday morning
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ matrix:
18
+ ruby-version:
19
+ - '2.5'
20
+ - '2.6'
21
+ - '2.7'
22
+ steps:
23
+ - uses: actions/checkout@v2
24
+ - name: Set up Ruby ${{ matrix.ruby-version }}
25
+ uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: ${{ matrix.ruby-version }}
28
+ - name: Install dependencies
29
+ run: |
30
+ bundle
31
+ - name: Test
32
+ run: |
33
+ bundle exec rake ci
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.0 (February 3, 2021)
4
+
5
+ - add support for [Zeebe 0.26.0](https://github.com/zeebe-io/zeebe/releases/tag/0.26.0)
6
+
7
+ ## 0.12.1 (December 11, 2020)
8
+
9
+ - add support for [Zeebe 0.25.3](https://github.com/zeebe-io/zeebe/releases/tag/0.25.3)
10
+ - drop Travis CI in favor of Github Actions
11
+
12
+ ## 0.12.0 (November 9, 2020)
13
+
14
+ - add support for [Zeebe 0.25.1](https://github.com/zeebe-io/zeebe/releases/tag/0.25.1)
15
+
16
+ ## 0.11.2 (November 5, 2020)
17
+
18
+ - relax `grpc` dependency version constraint from `~> 1.32.0` to `~> 1.32` thus allowing usage of future versions that are compatible due to [semver](https://github.com/grpc/grpc/blob/master/doc/versioning.md), thanks @rusterholz
19
+
20
+ ## 0.11.1 (November 4, 2020)
21
+
22
+ - add support for [Zeebe 0.24.3](https://github.com/zeebe-io/zeebe/releases/tag/0.24.3)
23
+
3
24
  ## 0.11.0 (July 29, 2020)
4
25
 
5
26
  - support Ruby 2.7
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Zeebe Ruby Client
2
2
 
3
- [![Build Status](https://travis-ci.org/zeebe-io/zeebe-client-ruby.svg?branch=master)](https://travis-ci.org/zeebe-io/zeebe-client-ruby/)
3
+ ![Build Status](https://github.com/zeebe-io/zeebe-client-ruby/workflows/ci/badge.svg)
4
4
 
5
5
  [Zeebe](https://zeebe.io) client containing a simple wrapper for the GRPC protocol used by Zeebe.
6
6
 
@@ -13,7 +13,7 @@ Install the gem:
13
13
  Run a Zeebe instance locally:
14
14
 
15
15
  ```sh
16
- docker run -it --rm -p 26500:26500 camunda/zeebe:0.24.1
16
+ docker run -it --rm -p 26500:26500 camunda/zeebe:0.26.0
17
17
  ```
18
18
 
19
19
  And then try the available [demo script](examples/demo.rb).
data/Rakefile CHANGED
@@ -9,11 +9,11 @@ Bundler::Audit::Task.new
9
9
 
10
10
  task default: [:rubocop, :spec, 'bundle:audit']
11
11
 
12
- task travis: ['zeebe:start', :default, 'zeebe:stop']
12
+ task ci: ['zeebe:start', :default, 'zeebe:stop']
13
13
 
14
14
  desc 'Starts Zeebe Docker container'
15
15
  task 'zeebe:start' do
16
- sh 'docker run -d --name zeebe --rm -p 26500:26500 camunda/zeebe:0.24.1'
16
+ sh 'docker run -d --name zeebe --rm -p 26500:26500 camunda/zeebe:0.26.0'
17
17
  sleep(10)
18
18
  end
19
19
 
data/examples/demo.rb CHANGED
@@ -13,8 +13,3 @@ puts " Brokers:"
13
13
  topology.brokers.each do |b|
14
14
  puts " - id: #{b.nodeId}, address: #{b.host}:#{b.port}, partitions: #{b.partitions.map { |p| p.partitionId }}"
15
15
  end
16
-
17
- workflows = zeebe_client.list_workflows(Zeebe::Client::GatewayProtocol::ListWorkflowsRequest.new).workflows
18
-
19
- puts ""
20
- puts "Zeebe workflows: #{workflows.inspect}"
data/gen-grpc.sh CHANGED
@@ -6,5 +6,5 @@ genPath="lib/zeebe/client"
6
6
  grpc_tools_ruby_protoc "${protoPath}/gateway.proto" --ruby_out="${genPath}" --grpc_out="${genPath}"
7
7
 
8
8
  sed -i 's@proto/gateway_pb@zeebe/client/proto/gateway_pb@g' "${genPath}/proto/gateway_services_pb.rb"
9
- sed -i 's@module GatewayProtocol@module Zeebe::Client::GatewayProtocol@g' "${genPath}/proto/gateway_pb.rb"
10
- sed -i 's@module GatewayProtocol@module Zeebe::Client::GatewayProtocol@g' "${genPath}/proto/gateway_services_pb.rb"
9
+ sed -i 's@GatewayProtocol@Zeebe::Client::GatewayProtocol@g' "${genPath}/proto/gateway_pb.rb"
10
+ sed -i 's@GatewayProtocol@Zeebe::Client::GatewayProtocol@g' "${genPath}/proto/gateway_services_pb.rb"
@@ -111,6 +111,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
111
111
  optional :variables, :string, 5
112
112
  end
113
113
  add_message "gateway_protocol.PublishMessageResponse" do
114
+ optional :key, :int64, 1
114
115
  end
115
116
  add_message "gateway_protocol.ResolveIncidentRequest" do
116
117
  optional :incidentKey, :int64, 1
@@ -136,11 +137,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
136
137
  add_message "gateway_protocol.Partition" do
137
138
  optional :partitionId, :int32, 1
138
139
  optional :role, :enum, 2, "gateway_protocol.Partition.PartitionBrokerRole"
140
+ optional :health, :enum, 3, "gateway_protocol.Partition.PartitionBrokerHealth"
139
141
  end
140
142
  add_enum "gateway_protocol.Partition.PartitionBrokerRole" do
141
143
  value :LEADER, 0
142
144
  value :FOLLOWER, 1
143
145
  end
146
+ add_enum "gateway_protocol.Partition.PartitionBrokerHealth" do
147
+ value :HEALTHY, 0
148
+ value :UNHEALTHY, 1
149
+ end
144
150
  add_message "gateway_protocol.UpdateJobRetriesRequest" do
145
151
  optional :jobKey, :int64, 1
146
152
  optional :retries, :int32, 2
@@ -188,6 +194,7 @@ module Zeebe::Client::GatewayProtocol
188
194
  BrokerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.BrokerInfo").msgclass
189
195
  Partition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.Partition").msgclass
190
196
  Partition::PartitionBrokerRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.Partition.PartitionBrokerRole").enummodule
197
+ Partition::PartitionBrokerHealth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.Partition.PartitionBrokerHealth").enummodule
191
198
  UpdateJobRetriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesRequest").msgclass
192
199
  UpdateJobRetriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.UpdateJobRetriesResponse").msgclass
193
200
  SetVariablesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway_protocol.SetVariablesRequest").msgclass
@@ -24,14 +24,14 @@ module Zeebe::Client::GatewayProtocol
24
24
  # - worker is blank (empty string, null)
25
25
  # - timeout less than 1
26
26
  # - maxJobsToActivate is less than 1
27
- rpc :ActivateJobs, ActivateJobsRequest, stream(ActivateJobsResponse)
27
+ rpc :ActivateJobs, ::Zeebe::Client::GatewayProtocol::ActivateJobsRequest, stream(::Zeebe::Client::GatewayProtocol::ActivateJobsResponse)
28
28
  #
29
29
  # Cancels a running workflow instance
30
30
  #
31
31
  # Errors:
32
32
  # NOT_FOUND:
33
33
  # - no workflow instance exists with the given key
34
- rpc :CancelWorkflowInstance, CancelWorkflowInstanceRequest, CancelWorkflowInstanceResponse
34
+ rpc :CancelWorkflowInstance, ::Zeebe::Client::GatewayProtocol::CancelWorkflowInstanceRequest, ::Zeebe::Client::GatewayProtocol::CancelWorkflowInstanceResponse
35
35
  #
36
36
  # Completes a job with the given variables, which allows completing the associated service task.
37
37
  #
@@ -43,7 +43,7 @@ module Zeebe::Client::GatewayProtocol
43
43
  # FAILED_PRECONDITION:
44
44
  # - the job was marked as failed. In that case, the related incident must be resolved before
45
45
  # the job can be activated again and completed.
46
- rpc :CompleteJob, CompleteJobRequest, CompleteJobResponse
46
+ rpc :CompleteJob, ::Zeebe::Client::GatewayProtocol::CompleteJobRequest, ::Zeebe::Client::GatewayProtocol::CompleteJobResponse
47
47
  #
48
48
  # Creates and starts an instance of the specified workflow. The workflow definition to use to
49
49
  # create the instance can be specified either using its unique key (as returned by
@@ -64,10 +64,10 @@ module Zeebe::Client::GatewayProtocol
64
64
  # INVALID_ARGUMENT:
65
65
  # - the given variables argument is not a valid JSON document; it is expected to be a valid
66
66
  # JSON document where the root node is an object.
67
- rpc :CreateWorkflowInstance, CreateWorkflowInstanceRequest, CreateWorkflowInstanceResponse
67
+ rpc :CreateWorkflowInstance, ::Zeebe::Client::GatewayProtocol::CreateWorkflowInstanceRequest, ::Zeebe::Client::GatewayProtocol::CreateWorkflowInstanceResponse
68
68
  #
69
69
  # Behaves similarly to `rpc CreateWorkflowInstance`, except that a successful response is received when the workflow completes successfully.
70
- rpc :CreateWorkflowInstanceWithResult, CreateWorkflowInstanceWithResultRequest, CreateWorkflowInstanceWithResultResponse
70
+ rpc :CreateWorkflowInstanceWithResult, ::Zeebe::Client::GatewayProtocol::CreateWorkflowInstanceWithResultRequest, ::Zeebe::Client::GatewayProtocol::CreateWorkflowInstanceWithResultResponse
71
71
  #
72
72
  # Deploys one or more workflows to Zeebe. Note that this is an atomic call,
73
73
  # i.e. either all workflows are deployed, or none of them are.
@@ -79,7 +79,7 @@ module Zeebe::Client::GatewayProtocol
79
79
  # - it is not a BPMN or YAML file (currently detected through the file extension)
80
80
  # - the resource data is not deserializable (e.g. detected as BPMN, but it's broken XML)
81
81
  # - the workflow is invalid (e.g. an event-based gateway has an outgoing sequence flow to a task)
82
- rpc :DeployWorkflow, DeployWorkflowRequest, DeployWorkflowResponse
82
+ rpc :DeployWorkflow, ::Zeebe::Client::GatewayProtocol::DeployWorkflowRequest, ::Zeebe::Client::GatewayProtocol::DeployWorkflowResponse
83
83
  #
84
84
  # Marks the job as failed; if the retries argument is positive, then the job will be immediately
85
85
  # activatable again, and a worker could try again to process it. If it is zero or negative however,
@@ -93,7 +93,7 @@ module Zeebe::Client::GatewayProtocol
93
93
  # FAILED_PRECONDITION:
94
94
  # - the job was not activated
95
95
  # - the job is already in a failed state, i.e. ran out of retries
96
- rpc :FailJob, FailJobRequest, FailJobResponse
96
+ rpc :FailJob, ::Zeebe::Client::GatewayProtocol::FailJobRequest, ::Zeebe::Client::GatewayProtocol::FailJobResponse
97
97
  #
98
98
  # Reports a business error (i.e. non-technical) that occurs while processing a job. The error is handled in the workflow by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead.
99
99
  #
@@ -103,7 +103,7 @@ module Zeebe::Client::GatewayProtocol
103
103
  #
104
104
  # FAILED_PRECONDITION:
105
105
  # - the job is not in an activated state
106
- rpc :ThrowError, ThrowErrorRequest, ThrowErrorResponse
106
+ rpc :ThrowError, ::Zeebe::Client::GatewayProtocol::ThrowErrorRequest, ::Zeebe::Client::GatewayProtocol::ThrowErrorResponse
107
107
  #
108
108
  # Publishes a single message. Messages are published to specific partitions computed from their
109
109
  # correlation keys.
@@ -111,7 +111,7 @@ module Zeebe::Client::GatewayProtocol
111
111
  # Errors:
112
112
  # ALREADY_EXISTS:
113
113
  # - a message with the same ID was previously published (and is still alive)
114
- rpc :PublishMessage, PublishMessageRequest, PublishMessageResponse
114
+ rpc :PublishMessage, ::Zeebe::Client::GatewayProtocol::PublishMessageRequest, ::Zeebe::Client::GatewayProtocol::PublishMessageResponse
115
115
  #
116
116
  # Resolves a given incident. This simply marks the incident as resolved; most likely a call to
117
117
  # UpdateJobRetries or SetVariables will be necessary to actually resolve the
@@ -120,7 +120,7 @@ module Zeebe::Client::GatewayProtocol
120
120
  # Errors:
121
121
  # NOT_FOUND:
122
122
  # - no incident with the given key exists
123
- rpc :ResolveIncident, ResolveIncidentRequest, ResolveIncidentResponse
123
+ rpc :ResolveIncident, ::Zeebe::Client::GatewayProtocol::ResolveIncidentRequest, ::Zeebe::Client::GatewayProtocol::ResolveIncidentResponse
124
124
  #
125
125
  # Updates all the variables of a particular scope (e.g. workflow instance, flow element instance)
126
126
  # from the given JSON document.
@@ -131,10 +131,10 @@ module Zeebe::Client::GatewayProtocol
131
131
  # INVALID_ARGUMENT:
132
132
  # - the given variables document is not a valid JSON document; valid documents are expected to
133
133
  # be JSON documents where the root node is an object.
134
- rpc :SetVariables, SetVariablesRequest, SetVariablesResponse
134
+ rpc :SetVariables, ::Zeebe::Client::GatewayProtocol::SetVariablesRequest, ::Zeebe::Client::GatewayProtocol::SetVariablesResponse
135
135
  #
136
136
  # Obtains the current topology of the cluster the gateway is part of.
137
- rpc :Topology, TopologyRequest, TopologyResponse
137
+ rpc :Topology, ::Zeebe::Client::GatewayProtocol::TopologyRequest, ::Zeebe::Client::GatewayProtocol::TopologyResponse
138
138
  #
139
139
  # Updates the number of retries a job has left. This is mostly useful for jobs that have run out of
140
140
  # retries, should the underlying problem be solved.
@@ -145,7 +145,7 @@ module Zeebe::Client::GatewayProtocol
145
145
  #
146
146
  # INVALID_ARGUMENT:
147
147
  # - retries is not greater than 0
148
- rpc :UpdateJobRetries, UpdateJobRetriesRequest, UpdateJobRetriesResponse
148
+ rpc :UpdateJobRetries, ::Zeebe::Client::GatewayProtocol::UpdateJobRetriesRequest, ::Zeebe::Client::GatewayProtocol::UpdateJobRetriesResponse
149
149
  end
150
150
 
151
151
  Stub = Service.rpc_stub_class
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Zeebe
3
3
  module Client
4
- VERSION = '0.11.0'.freeze
4
+ VERSION = '0.13.0'.freeze
5
5
  end
6
6
  end
data/proto/gateway.proto CHANGED
@@ -226,6 +226,8 @@ message PublishMessageRequest {
226
226
  }
227
227
 
228
228
  message PublishMessageResponse {
229
+ // the unique ID of the message that was published
230
+ int64 key = 1;
229
231
  }
230
232
 
231
233
  message ResolveIncidentRequest {
@@ -272,10 +274,18 @@ message Partition {
272
274
  FOLLOWER = 1;
273
275
  }
274
276
 
277
+ // Describes the current health of the partition
278
+ enum PartitionBrokerHealth {
279
+ HEALTHY = 0;
280
+ UNHEALTHY = 1;
281
+ }
282
+
275
283
  // the unique ID of this partition
276
284
  int32 partitionId = 1;
277
285
  // the role of the broker for this partition
278
286
  PartitionBrokerRole role = 2;
287
+ // the health of this partition
288
+ PartitionBrokerHealth health = 3;
279
289
  }
280
290
 
281
291
  message UpdateJobRetriesRequest {
data/zeebe-client.gemspec CHANGED
@@ -19,11 +19,11 @@ Gem::Specification.new do |s|
19
19
 
20
20
  s.required_ruby_version = '>= 2.3'
21
21
 
22
- s.add_runtime_dependency 'grpc', '~> 1.28.0'
22
+ s.add_runtime_dependency 'grpc', '~> 1.32'
23
23
 
24
24
  s.add_development_dependency 'bundler'
25
25
  s.add_development_dependency 'bundler-audit', '~> 0.7.0'
26
- s.add_development_dependency 'grpc-tools', '~> 1.28.0'
26
+ s.add_development_dependency 'grpc-tools', '~> 1.32'
27
27
  s.add_development_dependency 'rake'
28
28
  s.add_development_dependency 'rspec'
29
29
  s.add_development_dependency 'rubocop', '~> 0.81.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeebe-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Nicolai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-29 00:00:00.000000000 Z
11
+ date: 2021-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.28.0
19
+ version: '1.32'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.28.0
26
+ version: '1.32'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.28.0
61
+ version: '1.32'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.28.0
68
+ version: '1.32'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -130,10 +130,10 @@ extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
132
  - ".github/dependabot.yml"
133
+ - ".github/workflows/ci.yml"
133
134
  - ".gitignore"
134
135
  - ".rubocop.yml"
135
136
  - ".solargraph.yml"
136
- - ".travis.yml"
137
137
  - CHANGELOG.md
138
138
  - CODE_OF_CONDUCT.md
139
139
  - Gemfile
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  - !ruby/object:Gem::Version
170
170
  version: '0'
171
171
  requirements: []
172
- rubygems_version: 3.0.8
172
+ rubygems_version: 3.1.4
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: Zeebe Client
data/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- ---
2
- os: linux
3
- language: ruby
4
- rvm:
5
- - 2.7
6
- - 2.6
7
- - 2.5
8
-
9
- jobs:
10
- fast_finish: true
11
-
12
- services:
13
- - docker
14
-
15
- script:
16
- - bundle exec rake travis