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

docs: ZEEBE_ADDRESS defaults to localhost and used when ZEEBE_GRPC_ADDRESS is set #245

Closed
pafmaf opened this issue Sep 10, 2024 · 2 comments

Comments

@pafmaf
Copy link

pafmaf commented Sep 10, 2024

Hi! This is something that was not obvious to us during setup / configuration. Should be a simple fix if you know how it is supposed to work. Please clarify :)

SDK Component

Docs

Expected Behavior

README explains when and how to set ZEEBE_ADDRESS when ZEEBE_GRPC_ADDRESS was already set.

Current Behavior

ZEEBE_ADDRESS is not mentioned in the README. It is documented somewhere else, as "Zeebe Gateway Address". It's still used and we, for example, need to set it like ZEEBE_ADDRESS = ZEEBE_GRPC_ADDRESS. The given examples did not work, since it defaults to localhost....

export ZEEBE_GRPC_ADDRESS='5c34c0a7-7f29-4424-8414-125615f7a9b9.syd-1.zeebe.camunda.io:443'
export ZEEBE_REST_ADDRESS='https://syd-1.zeebe.camunda.io/5c34c0a7-7f29-4424-8414-125615f7a9b9'
export ZEEBE_CLIENT_ID='yvvURO9TmBnP3zx4Xd8Ho6apgeiZTjn6'
export ZEEBE_CLIENT_SECRET='iJJu-SHgUtuJTTAMnMLdcb8WGF8s2mHfXhXutEwe8eSbLXn98vUpoxtuLk5uG0en'

Possible Solution

Explain when ZEEBE_ADDRESS is required to be set / when it is used / how the setup is intended to work with multiple config values: ZEEBE_ADDRESS + ZEEBE_GRPC_ADDRESS (or ZEEBE_REST_ADDRESS).

@jwulf
Copy link
Member

jwulf commented Sep 10, 2024

Sorry that this isn't working as expected, and THANKS for finding and reporting this.

I'll take a look at it tomorrow and push a fix in the next day or two.

@jwulf
Copy link
Member

jwulf commented Sep 13, 2024

This is where it happens: line 138 in src/zeebe/zb/ZeebeGrpcClient.ts:

this.gatewayAddress = RequireConfiguration(
    config.ZEEBE_ADDRESS || config.ZEEBE_GRPC_ADDRESS,
    'ZEEBE_GRPC_ADDRESS'
)

The Configuration hydration defaults ZEEBE_ADDRESS to localhost:26500.

If we change this to have no default, and instead default ZEEBE_GRPC_ADDRESS to localhost:26500 we will preserve the existing behaviour: no explicit configuration defaults to localhost:26500. And an explicit ZEEBE_GRPC_ADDRESS will not be overridden by a default.

jwulf added a commit that referenced this issue Sep 13, 2024
@jwulf jwulf closed this as completed in cd6080f Oct 24, 2024
github-actions bot pushed a commit that referenced this issue Oct 24, 2024
## [8.6.14](v8.6.13...v8.6.14) (2024-10-24)

### Bug Fixes

* **camunda8:** correctly parse autostart parameter of JobWorker ([cb95946](cb95946))
* **camunda8:** type variables in async process instance start as never ([3055734](3055734))
* **lossless-parser:** correctly parse number array ([d69729a](d69729a)), closes [#258](#258)
* **lossless-parser:** throw on encountering Date, Map, or Set ([bb5d8ea](bb5d8ea)), closes [#254](#254)
* **zeebe:** do not override explicit ZEEBE_GRPC_ADDRESS with default ZEEBE_ADDRESS ([cd6080f](cd6080f)), closes [#245](#245)
* **zeebe:** throw on client if array passed as variables to CompleteJob ([40a6316](40a6316)), closes [#247](#247)

### Features

* **camunda8:** add C8RestClient ([8e93c92](8e93c92)), closes [#235](#235)
* **camunda8:** add modifyAuthorization method ([0d97f68](0d97f68))
* **camunda8:** complete deployResources feature ([8043ac9](8043ac9))
* **camunda8:** implement createProcessInstanceWithResult ([4ec4fa1](4ec4fa1))
* **camunda8:** implement deleteResource over REST ([1dcb101](1dcb101)), closes [#251](#251)
* **camunda8:** implement deployResources REST API ([debd212](debd212))
* **camunda8:** implement publishMessage over REST ([057a9fe](057a9fe)), closes [#250](#250)
* **camunda8:** support broadcastSignal over REST ([43f82a4](43f82a4)), closes [#248](#248)
* **camunda8:** support pluggable winston logging for C8RestClient ([d41d3f8](d41d3f8))
* **camunda8:** support updateElementInstanceVariables ([7de82b7](7de82b7)), closes [#249](#249)
* **repo:** support passing middleware ([1b7715e](1b7715e)), closes [#261](#261)
* **zeebe:** add operationReference field to gRPC methods ([2e5af66](2e5af66)), closes [#237](#237)
* **zeebe:** create and cancel process instances over REST ([a49d217](a49d217))
* **zeebe:** lossless parse REST variables and customheaders ([f19a252](f19a252)), closes [#244](#244)
github-actions bot pushed a commit that referenced this issue Oct 24, 2024
## [8.6.14](v8.6.13...v8.6.14) (2024-10-24)

### Bug Fixes

* **camunda8:** correctly parse autostart parameter of JobWorker ([cb95946](cb95946))
* **camunda8:** type variables in async process instance start as never ([3055734](3055734))
* **lossless-parser:** correctly parse number array ([d69729a](d69729a)), closes [#258](#258)
* **lossless-parser:** throw on encountering Date, Map, or Set ([bb5d8ea](bb5d8ea)), closes [#254](#254)
* **zeebe:** do not override explicit ZEEBE_GRPC_ADDRESS with default ZEEBE_ADDRESS ([cd6080f](cd6080f)), closes [#245](#245)
* **zeebe:** throw on client if array passed as variables to CompleteJob ([40a6316](40a6316)), closes [#247](#247)

### Features

* **camunda8:** add C8RestClient ([8e93c92](8e93c92)), closes [#235](#235)
* **camunda8:** add modifyAuthorization method ([0d97f68](0d97f68))
* **camunda8:** complete deployResources feature ([8043ac9](8043ac9))
* **camunda8:** implement createProcessInstanceWithResult ([4ec4fa1](4ec4fa1))
* **camunda8:** implement deleteResource over REST ([1dcb101](1dcb101)), closes [#251](#251)
* **camunda8:** implement deployResources REST API ([debd212](debd212))
* **camunda8:** implement publishMessage over REST ([057a9fe](057a9fe)), closes [#250](#250)
* **camunda8:** support broadcastSignal over REST ([43f82a4](43f82a4)), closes [#248](#248)
* **camunda8:** support pluggable winston logging for C8RestClient ([d41d3f8](d41d3f8))
* **camunda8:** support updateElementInstanceVariables ([7de82b7](7de82b7)), closes [#249](#249)
* **repo:** support passing middleware ([1b7715e](1b7715e)), closes [#261](#261)
* **zeebe:** add operationReference field to gRPC methods ([2e5af66](2e5af66)), closes [#237](#237)
* **zeebe:** create and cancel process instances over REST ([a49d217](a49d217))
* **zeebe:** lossless parse REST variables and customheaders ([f19a252](f19a252)), closes [#244](#244)
petar-slavov pushed a commit to petar-slavov/camunda-8-js-sdk that referenced this issue Mar 14, 2025
## [8.6.14](camunda/camunda-8-js-sdk@v8.6.13...v8.6.14) (2024-10-24)

### Bug Fixes

* **camunda8:** correctly parse autostart parameter of JobWorker ([cb95946](camunda@cb95946))
* **camunda8:** type variables in async process instance start as never ([3055734](camunda@3055734))
* **lossless-parser:** correctly parse number array ([d69729a](camunda@d69729a)), closes [camunda#258](camunda#258)
* **lossless-parser:** throw on encountering Date, Map, or Set ([bb5d8ea](camunda@bb5d8ea)), closes [camunda#254](camunda#254)
* **zeebe:** do not override explicit ZEEBE_GRPC_ADDRESS with default ZEEBE_ADDRESS ([cd6080f](camunda@cd6080f)), closes [camunda#245](camunda#245)
* **zeebe:** throw on client if array passed as variables to CompleteJob ([40a6316](camunda@40a6316)), closes [camunda#247](camunda#247)

### Features

* **camunda8:** add C8RestClient ([8e93c92](camunda@8e93c92)), closes [camunda#235](camunda#235)
* **camunda8:** add modifyAuthorization method ([0d97f68](camunda@0d97f68))
* **camunda8:** complete deployResources feature ([8043ac9](camunda@8043ac9))
* **camunda8:** implement createProcessInstanceWithResult ([4ec4fa1](camunda@4ec4fa1))
* **camunda8:** implement deleteResource over REST ([1dcb101](camunda@1dcb101)), closes [camunda#251](camunda#251)
* **camunda8:** implement deployResources REST API ([debd212](camunda@debd212))
* **camunda8:** implement publishMessage over REST ([057a9fe](camunda@057a9fe)), closes [camunda#250](camunda#250)
* **camunda8:** support broadcastSignal over REST ([43f82a4](camunda@43f82a4)), closes [camunda#248](camunda#248)
* **camunda8:** support pluggable winston logging for C8RestClient ([d41d3f8](camunda@d41d3f8))
* **camunda8:** support updateElementInstanceVariables ([7de82b7](camunda@7de82b7)), closes [camunda#249](camunda#249)
* **repo:** support passing middleware ([1b7715e](camunda@1b7715e)), closes [camunda#261](camunda#261)
* **zeebe:** add operationReference field to gRPC methods ([2e5af66](camunda@2e5af66)), closes [camunda#237](camunda#237)
* **zeebe:** create and cancel process instances over REST ([a49d217](camunda@a49d217))
* **zeebe:** lossless parse REST variables and customheaders ([f19a252](camunda@f19a252)), closes [camunda#244](camunda#244)
petar-slavov pushed a commit to petar-slavov/camunda-8-js-sdk that referenced this issue Mar 14, 2025
## [8.6.14](camunda/camunda-8-js-sdk@v8.6.13...v8.6.14) (2024-10-24)

### Bug Fixes

* **camunda8:** correctly parse autostart parameter of JobWorker ([cb95946](camunda@cb95946))
* **camunda8:** type variables in async process instance start as never ([3055734](camunda@3055734))
* **lossless-parser:** correctly parse number array ([d69729a](camunda@d69729a)), closes [camunda#258](camunda#258)
* **lossless-parser:** throw on encountering Date, Map, or Set ([bb5d8ea](camunda@bb5d8ea)), closes [camunda#254](camunda#254)
* **zeebe:** do not override explicit ZEEBE_GRPC_ADDRESS with default ZEEBE_ADDRESS ([cd6080f](camunda@cd6080f)), closes [camunda#245](camunda#245)
* **zeebe:** throw on client if array passed as variables to CompleteJob ([40a6316](camunda@40a6316)), closes [camunda#247](camunda#247)

### Features

* **camunda8:** add C8RestClient ([8e93c92](camunda@8e93c92)), closes [camunda#235](camunda#235)
* **camunda8:** add modifyAuthorization method ([0d97f68](camunda@0d97f68))
* **camunda8:** complete deployResources feature ([8043ac9](camunda@8043ac9))
* **camunda8:** implement createProcessInstanceWithResult ([4ec4fa1](camunda@4ec4fa1))
* **camunda8:** implement deleteResource over REST ([1dcb101](camunda@1dcb101)), closes [camunda#251](camunda#251)
* **camunda8:** implement deployResources REST API ([debd212](camunda@debd212))
* **camunda8:** implement publishMessage over REST ([057a9fe](camunda@057a9fe)), closes [camunda#250](camunda#250)
* **camunda8:** support broadcastSignal over REST ([43f82a4](camunda@43f82a4)), closes [camunda#248](camunda#248)
* **camunda8:** support pluggable winston logging for C8RestClient ([d41d3f8](camunda@d41d3f8))
* **camunda8:** support updateElementInstanceVariables ([7de82b7](camunda@7de82b7)), closes [camunda#249](camunda#249)
* **repo:** support passing middleware ([1b7715e](camunda@1b7715e)), closes [camunda#261](camunda#261)
* **zeebe:** add operationReference field to gRPC methods ([2e5af66](camunda@2e5af66)), closes [camunda#237](camunda#237)
* **zeebe:** create and cancel process instances over REST ([a49d217](camunda@a49d217))
* **zeebe:** lossless parse REST variables and customheaders ([f19a252](camunda@f19a252)), closes [camunda#244](camunda#244)
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