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

Cannot properly configure exporter args map with environment variable #4724

Closed
npepinpe opened this issue Jun 14, 2020 · 2 comments
Closed
Labels
kind/bug Categorizes an issue or PR as a bug scope/broker Marks an issue or PR to appear in the broker section of the changelog

Comments

@npepinpe
Copy link
Member

npepinpe commented Jun 14, 2020

Describe the bug

There's an issue when instantiating an exporter configuration bean and expecting it to be resolved using environment variables.

Spring, when given the environment variable ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_IGNOREVARIABLESABOVE, will create an args map with the following keys:

{
  "index": {
    "ignorevariablesabove": ...,
  }
}

However, when we use Gson to instantiate the bean, it fails, since the property is called ignoreVariablesAbove, and Gson will map it with case sensitivity.

This is unexpected from a user point of view, as for all other normal settings the above work in a case insensitive manner.

The workaround at the moment is to set it as a system property via JAVA_OPTS, to export JAVA_OPTS="${JAVA_OPTS} -Dzeebe.broker.exporters.elasticsearch.args.index.ignoreVariablesAbove=...", which preserves the camel case.

To Reproduce

Try to configure the ignoreVariablesAbove property of the ElasticsearchExporterConfiguration using ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_IGNOREVARIABLESABOVE, and it will fail.

Expected behavior

Exporter configuration bean instantiation works the same as the rest of Zeebe's configuration.

Log/Stacktrace

Not applicable

Environment:

  • OS: Linux
  • Zeebe Version: 0.24.0-SNAPSHOT
  • Configuration: Elasticsearch exporter configured with minimal properties (e.g. className).
@npepinpe npepinpe added kind/bug Categorizes an issue or PR as a bug scope/broker Marks an issue or PR to appear in the broker section of the changelog severity/low Marks a bug as having little to no noticeable impact for the user Status: Needs Priority and removed severity/low Marks a bug as having little to no noticeable impact for the user Status: Needs Priority labels Jun 14, 2020
@npepinpe
Copy link
Member Author

npepinpe commented Jul 15, 2021

The real solution would be to get access to the application context of the spring application from the broker. From there we can instantiate any bean as per Spring rules, which aligns with how the rest of the config is deserialized.

@npepinpe
Copy link
Member Author

npepinpe commented Nov 2, 2021

Superseded by #7628

@npepinpe npepinpe closed this as completed Nov 2, 2021
github-merge-queue bot pushed a commit that referenced this issue Mar 14, 2024
* chore: copy old login component to Carbon folder

* style: carbonize login page

* style: disable login button when any field is empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes an issue or PR as a bug scope/broker Marks an issue or PR to appear in the broker section of the changelog
Projects
None yet
Development

No branches or pull requests

1 participant