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

Allows disabling environment variable override in JavaClient #9401

Closed
berndruecker opened this issue May 18, 2022 · 2 comments · Fixed by #9411
Closed

Allows disabling environment variable override in JavaClient #9401

berndruecker opened this issue May 18, 2022 · 2 comments · Fixed by #9411
Assignees
Labels
area/ux Marks an issue as related to improving the user experience kind/feature Categorizes an issue or PR as a feature, i.e. new behavior scope/clients-java Marks an issue or PR to appear in the Java client section of the changelog version:1.3.10

Comments

@berndruecker
Copy link
Member

Is your feature request related to a problem? Please describe.

In the Java Client there is a hard overwrite of configuration properties for any client: https://github.com/camunda/zeebe/blob/87bd591e6b3aaea99cc87f818db4c8e0bfcc72cb/clients/java/src/main/java/io/camunda/zeebe/client/impl/ZeebeClientBuilderImpl.java#L297

This can cause problem if the client is configured in a scenario, where it is absolutely not expected, for example

  1. Test cases. If I create the zeebe-process-test engine and obtain a ZeebeClient from it, I expect this to connect to that test engine - and not take any kind of environment variables into account. A great example of the confusion it causes can be found here: Twitter Test does not always succeed camunda-community-hub/spring-zeebe#199

  2. Spring: Spring has its own mechanism to use environment variables for configuration. It is confusing for Spring users that there is a second possibility that might even overwrite the Spring config.

Describe the solution you'd like

I think we can't easily disable the functionality completely because of backward compatibility.

Hence, I would add a feature toggle in the client to disable environment variable overrides.

@berndruecker berndruecker added the kind/feature Categorizes an issue or PR as a feature, i.e. new behavior label May 18, 2022
@berndruecker berndruecker self-assigned this May 18, 2022
@lenaschoenburg lenaschoenburg added scope/clients-java Marks an issue or PR to appear in the Java client section of the changelog area/ux Marks an issue as related to improving the user experience team/process-automation labels May 18, 2022
@berndruecker
Copy link
Member Author

proposed PR: #9411

@berndruecker
Copy link
Member Author

We now have a feature toggle zeebe.client.applyEnvironmentVariableOverrides which defaults to true to stay backwards compatible

npepinpe pushed a commit that referenced this issue Jun 2, 2022
npepinpe pushed a commit that referenced this issue Jun 2, 2022
npepinpe pushed a commit that referenced this issue Jun 2, 2022
npepinpe pushed a commit that referenced this issue Jun 2, 2022
npepinpe pushed a commit that referenced this issue Jun 2, 2022
zeebe-bors-camunda bot added a commit that referenced this issue Jun 2, 2022
9488: [Backport stable/8.0] Allow disabling environment variable override in Java client r=remcowesterhoud a=npepinpe

## Description

This PR backports #9411 to 8.0.x. There was a single conflict on formatting, but nothing major.

## Related issues

backports #9411 
related to #9401 



Co-authored-by: Bernd Ruecker <bernd.ruecker@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this issue Jun 2, 2022
9482: Release 1.3.9 r=remcowesterhoud a=npepinpe

## Description

This PR merges the release commits for 1.3.9.



9487: [Backport stable/1.3] Allow disabling environment variable override in Java client r=remcowesterhoud a=npepinpe

## Description

This PR backports #9411 to 1.3.x. I had to adapt it a little for 1.3, so please review (it's fairly small though).

## Related issues

<!-- Which issues are closed by this PR or are related -->

backports #9411 
related to #9401 



Co-authored-by: 180642 <ci@camunda.com>
Co-authored-by: Bernd Ruecker <bernd.ruecker@camunda.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ux Marks an issue as related to improving the user experience kind/feature Categorizes an issue or PR as a feature, i.e. new behavior scope/clients-java Marks an issue or PR to appear in the Java client section of the changelog version:1.3.10
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants