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

Zeebe gRPC client.waitForReady always fails #150

Closed
jwulf opened this issue May 6, 2024 · 1 comment
Closed

Zeebe gRPC client.waitForReady always fails #150

jwulf opened this issue May 6, 2024 · 1 comment
Assignees

Comments

@jwulf
Copy link
Member

jwulf commented May 6, 2024

[Identified with a fix here]

In GrpcClient.ts, this call:

this.client.waitForReady(10000, (error) =>
	error
		? this.emit(MiddlewareSignals.Event.Error, error)
		: this.emit(MiddlewareSignals.Event.Ready)
)

always throws an error, because the first parameter needs to be an absolute time, not an offset.

So, it should be:

this.client.waitForReady(new Date(Date.now() + 10000), (error) =>
	error
		? this.emit(MiddlewareSignals.Event.Error, error)
		: this.emit(MiddlewareSignals.Event.Ready)
)
@jwulf jwulf self-assigned this May 6, 2024
@jwulf
Copy link
Member Author

jwulf commented May 6, 2024

This fix changes the behaviour of the SDK in the following way:

Before After
Does not set connected: true if there is a broker and eagerConnection: false Sets connected: true if there is a broker and eagerConnection: false
Sets connected: false if there is no broker and no setting of eagerConnection Sets connected: undefined if there is no broker and no setting of eagerConnection

jwulf added a commit that referenced this issue May 6, 2024
This fixes a bug in the grpc channel connection sensing

fixes #150
jwulf added a commit that referenced this issue May 6, 2024
This fixes a bug in the grpc channel connection sensing

fixes #150
jwulf added a commit that referenced this issue May 7, 2024
* feat(repo): add CAMUNDA_CUSTOM_ROOT_CERT_STRING parameter

accept a custom certificate as a string argument to the configuration

fixes #142

* style(zeebe): lint generated zeebe grpc code

* test(zeebe): extend timeout to deal with SaaS connection delay

* fix(zeebe): fix waitForReady deadline (#151)

This fixes a bug in the grpc channel connection sensing

fixes #150

* feat(repo): add CAMUNDA_CUSTOM_ROOT_CERT_STRING parameter

accept a custom certificate as a string argument to the configuration

fixes #142

* style(zeebe): lint generated zeebe grpc code

* test(zeebe): extend timeout to deal with SaaS connection delay

* test(zeebe): refactor test
github-actions bot pushed a commit that referenced this issue May 7, 2024
## [8.5.2-alpha.1](v8.5.1...v8.5.2-alpha.1) (2024-05-07)

### Bug Fixes

* **zeebe:** fix waitForReady deadline ([#151](#151)) ([a88ea2e](a88ea2e)), closes [#150](#150)

### Features

* **repo:** add CAMUNDA_CUSTOM_ROOT_CERT_STRING parameter ([#146](#146)) ([f828a95](f828a95)), closes [#142](#142) [#151](#151) [#150](#150) [#142](#142)
github-actions bot pushed a commit that referenced this issue May 7, 2024
## [8.5.2-alpha.1](v8.5.1...v8.5.2-alpha.1) (2024-05-07)

### Bug Fixes

* **zeebe:** fix waitForReady deadline ([#151](#151)) ([a88ea2e](a88ea2e)), closes [#150](#150)

### Features

* **repo:** add CAMUNDA_CUSTOM_ROOT_CERT_STRING parameter ([#146](#146)) ([f828a95](f828a95)), closes [#142](#142) [#151](#151) [#150](#150) [#142](#142)
@jwulf jwulf closed this as completed in 7451a66 May 7, 2024
github-actions bot pushed a commit that referenced this issue May 7, 2024
## [8.5.2](v8.5.1...v8.5.2) (2024-05-07)

### Bug Fixes

* **zeebe:** waitForReady deadline not miliseconds, but date ([#148](#148)) ([12db206](12db206))

### Features

* **repo:** add CAMUNDA_CUSTOM_ROOT_CERT_STRING parameter ([7451a66](7451a66)), closes [#151](#151) [#150](#150) [#146](#146) [#142](#142) [#151](#151) [#150](#150) [#142](#142) [#151](#151) [#150](#150) [#142](#142) [#151](#151) [#150](#150) [#142](#142) [#151](#151) [#150](#150) [#142](#142) [#151](#151) [#150](#150) [#142](#142)

### Reverts

* Revert "fix(zeebe): waitForReady deadline not miliseconds, but date (#148)" (#149) ([f8c0c7d](f8c0c7d)), closes [#148](#148) [#149](#149)
github-actions bot pushed a commit that referenced this issue May 7, 2024
## [8.5.2](v8.5.1...v8.5.2) (2024-05-07)

### Bug Fixes

* **zeebe:** waitForReady deadline not miliseconds, but date ([#148](#148)) ([12db206](12db206))

### Features

* **repo:** add CAMUNDA_CUSTOM_ROOT_CERT_STRING parameter ([7451a66](7451a66)), closes [#151](#151) [#150](#150) [#146](#146) [#142](#142) [#151](#151) [#150](#150) [#142](#142) [#151](#151) [#150](#150) [#142](#142) [#151](#151) [#150](#150) [#142](#142) [#151](#151) [#150](#150) [#142](#142) [#151](#151) [#150](#150) [#142](#142)

### Reverts

* Revert "fix(zeebe): waitForReady deadline not miliseconds, but date (#148)" (#149) ([f8c0c7d](f8c0c7d)), closes [#148](#148) [#149](#149)
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

1 participant