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

Allow relaxed instantiation of exporter configuration #9854

Merged
merged 5 commits into from
Jul 22, 2022

Conversation

npepinpe
Copy link
Member

Description

This PR fixes a bug where deserialization of exporter configuration was case sensitive, such that a property NUMBEROFSHARDS would not map to an instance field numberOfShards.

This isn't perfect, as now if we have two fields with the same name but different cases, only one of them will be set, using the latest value in the map (where the order is undefined). It should solve the most common cases however.

Related issues

closes #7628

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/1.3) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement
  • If the PR changes how BPMN processes are validated (e.g. support new BPMN element) then the Camunda modeling team should be informed to adjust the BPMN linting.

Please refer to our review guidelines.

Fixes a bug where deserialization of exporter configuration was case
sensitive, such that a property `NUMBEROFSHARDS` would not map to an
instance field `numberOfShards`.

This isn't perfect, as now if we have two fields with the same name but
different cases, only one of them will be set, using the latest value
in the map (where the order is undefined). It should solve the most common
cases however.
@github-actions
Copy link
Contributor

github-actions bot commented Jul 21, 2022

Unit Test Results

   794 files  +    2     794 suites  +2   1h 33m 3s ⏱️ - 2m 0s
5 759 tests  - 152  5 749 ✔️  - 153  9 💤 ±0  1 +1 
5 919 runs   - 161  5 909 ✔️  - 162  9 💤 ±0  1 +1 

For more details on these failures, see this check.

Results for commit 0fd1eeb. ± Comparison against base commit b270a21.

♻️ This comment has been updated with latest results.

Copy link
Member

@lenaschoenburg lenaschoenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, looks good 👍

🔧 Do we really want to close #7628 or is that an improvement we might want to do later?

@npepinpe
Copy link
Member Author

I think we should close it for now. While it would be nice, the nicest would still be to not have exporters ;)

@npepinpe
Copy link
Member Author

There was a flaky test, but I highly doubt it has anything to do with this PR, since the test is about message correlation/snapshots, and not exporter configuration (if the config was broken, you would think it would fail consistently).

bors merge

@zeebe-bors-camunda
Copy link
Contributor

Build succeeded:

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit b598714 into main Jul 22, 2022
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the 7628-exporter-config branch July 22, 2022 07:17
@backport-action
Copy link
Collaborator

Backport failed for stable/1.3, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin stable/1.3
git worktree add -d .worktree/backport-9854-to-stable/1.3 origin/stable/1.3
cd .worktree/backport-9854-to-stable/1.3
git checkout -b backport-9854-to-stable/1.3
ancref=$(git merge-base b270a213635b7f5dc2b1497c02acaec1057b149d 0fd1eebc8bcf07d248ecf628e19f70384a5dc1cb)
git cherry-pick -x $ancref..0fd1eebc8bcf07d248ecf628e19f70384a5dc1cb

@backport-action
Copy link
Collaborator

Backport failed for stable/8.0, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin stable/8.0
git worktree add -d .worktree/backport-9854-to-stable/8.0 origin/stable/8.0
cd .worktree/backport-9854-to-stable/8.0
git checkout -b backport-9854-to-stable/8.0
ancref=$(git merge-base b270a213635b7f5dc2b1497c02acaec1057b149d 0fd1eebc8bcf07d248ecf628e19f70384a5dc1cb)
git cherry-pick -x $ancref..0fd1eebc8bcf07d248ecf628e19f70384a5dc1cb

zeebe-bors-camunda bot added a commit that referenced this pull request Jul 22, 2022
9866: [Backport stable/8.0] Allow relaxed instantiation of exporter configuration r=npepinpe a=npepinpe

## Description

This PR backports #9854 to stable/8.0.

## Related issues

backports #9854 



Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Jul 26, 2022
9867: [Backport stable/1.3] Allow relaxed instantiation of exporter configuration r=npepinpe a=npepinpe

## Description

This PR backports #9854 to stable/1.3.

## Related issues

backports #9854 



Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Spring's ApplicationContext to instantiate exporter arguments
3 participants