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

Provide a way to get the parent scope key of a variable scope #6448

Merged
merged 1 commit into from Feb 26, 2021

Conversation

npepinpe
Copy link
Member

Description

As part of #6175, we will need a way to walk the scope hierarchy of variable scopes in order to properly merge variable documents, and this will be done outside of the VariableState. The simplest solution is simply to expose getParentScopeKey which returns either the parent scope key, or NO_PARENT if there is none.

If we end up walking this hierarchy a lot, then we could always introduce a more complex abstraction, but this is fine for now.

Related issues

related to #6175
blocked by #6446

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/0.25) 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

@npepinpe npepinpe self-assigned this Feb 25, 2021
@npepinpe
Copy link
Member Author

This PR currently includes commits from #6446 as it builds on top of it - it'll probably be easier to review once that one is merged.

- exposes getParentScopeKey to the outside world
- adds test cases
- renames VariablesState to VariableState to align with other interfaces
  such as MutableVariableState
@npepinpe npepinpe marked this pull request as ready for review February 26, 2021 09:55
Copy link
Member

@korthout korthout left a comment

Choose a reason for hiding this comment

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

LGTM 🎈

@npepinpe
Copy link
Member Author

bors r+

@zeebe-bors zeebe-bors bot merged commit 8254d3b into develop Feb 26, 2021
@zeebe-bors
Copy link
Contributor

zeebe-bors bot commented Feb 26, 2021

Build succeeded:

@zeebe-bors zeebe-bors bot deleted the 6175-parent-scope branch February 26, 2021 11:01
zeebe-bors bot added a commit that referenced this pull request Feb 26, 2021
6449: Allow detecting if a variable is declared locally in a given scope r=npepinpe a=npepinpe

## Description

This PR adds `hasVariableLocal` to `VariableState`. This will allow us to extract a document merging behaviour - when propagating the merge, we need to know if a given scope already declares a variable or not (to know if we need to propagate it further).

## Related issues

related to #6175 
blocked by #6448 

## Definition of Done

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

Code changes:
* [x] The changes are backwards compatibility with previous versions
* [ ] If it fixes a bug then PRs are created to [backport](https://github.com/zeebe-io/zeebe/compare/stable/0.24...develop?expand=1&template=backport_template.md&title=[Backport%200.24]) the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. `backport stable/0.25`) to the PR, in case that fails you need to create backports manually.

Testing:
* [x] There are unit/integration tests that verify all acceptance criterias of the issue
* [x] New tests are written to ensure backwards compatibility with further versions
* [x] 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](https://drive.google.com/drive/u/0/folders/1DTIeswnEEq-NggJ25rm2BsDjcCQpDape)


Co-authored-by: Nicolas Pépin-Perreault <nicolas.pepin-perreault@camunda.com>
kristinkomschow added a commit that referenced this pull request Mar 15, 2024
* removed tenant check in ProcessStore calls
* changed used client from tenant aware to high level client in DecisionStores
* adjusted related test to mock high level client
kristinkomschow added a commit that referenced this pull request Mar 20, 2024
* removed tenant check in ProcessStore calls
* changed used client from tenant aware to high level client in DecisionStores
* adjusted related test to mock high level client
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

Successfully merging this pull request may close these issues.

None yet

3 participants