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

refactor(engine): specify an error message when deployed process id not found in state #12196

Conversation

berkaycanbc
Copy link
Contributor

@berkaycanbc berkaycanbc commented Mar 30, 2023

Description

There is an issue that when a deployed process cannot be found in state, NoSuchElementException is thrown. Currently, we could not re-produce the issue. This PR adds an error message that contains persisted processes id so that we can use this id to inspect process through zdb and retrieve the resource XML from there. Then, we can use that XML to reproduce the issue locally and debug it to find the actual problem.

Related issues

closes #11414

Note: It closes the issue above but a new issue will be opened again when we identify the exact cause.

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.)
  • 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.

Other teams:
If the change impacts another team an issue has been created for this team, explaining what they need to do to support this change.

Please refer to our review guidelines.

…ot found in state

There is an issue that when a deployed process cannot be found in state, NoSuchElementException is thrown. Currently, we could not re-produce the issue. This PR adds an error message that contains persisted processes id so that we can use this id to inspect process through 'zdb' and retrieve the resource XML from there. Then, we can use that XML to reproduce the issue locally and debug it to find the actual problem.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 30, 2023

Test Results

1 044 files  ±    0  1 044 suites  ±0   1h 51m 51s ⏱️ +19s
8 544 tests +215  8 522 ✔️ +215  22 💤 ±0  0 ±0 
8 752 runs  +215  8 730 ✔️ +215  22 💤 ±0  0 ±0 

Results for commit a816590. ± Comparison against base commit b0cf727.

This pull request removes 473 and adds 688 tests. Note that renamed tests count towards both.
DmnEvaluationTest If successfully evaluated, the output ‑ Should return a message pack output[6] value={z=[1, 2, 3], x=1, y=true}
io.camunda.zeebe.engine.processing.bpmn.activity.OutputMappingTest ‑ shouldApplyOutputMapping[0: io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@3c04ddda]
io.camunda.zeebe.engine.processing.bpmn.activity.OutputMappingTest ‑ shouldApplyOutputMapping[1: io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@78c23ade]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=BUSINESS_RULE_TASK, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@4a842e8a, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=CALL_ACTIVITY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@7537f638, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=END_EVENT, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@633e4742, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EVENT_BASED_GATEWAY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@45ec9b22, variables={correlationKey=value}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EVENT_SUB_PROCESS, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@3f96ef2, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EXCLUSIVE_GATEWAY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@584f12eb, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=INTERMEDIATE_CATCH_EVENT, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@12039ae0, variables={correlationKey=value}]]
…
DmnEvaluationTest If successfully evaluated, the output ‑ Should return a message pack output[6] value={x=1, y=true, z=[1, 2, 3]}
io.camunda.zeebe.engine.processing.bpmn.activity.OutputMappingTest ‑ shouldApplyOutputMapping[0: io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@5837b801]
io.camunda.zeebe.engine.processing.bpmn.activity.OutputMappingTest ‑ shouldApplyOutputMapping[1: io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@2f1e3e1c]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=BUSINESS_RULE_TASK, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@71b6edfb, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=CALL_ACTIVITY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@2b33f7a0, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=END_EVENT, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@1784fcab, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EVENT_BASED_GATEWAY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@7fb28ed, variables={correlationKey=value}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EVENT_SUB_PROCESS, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@edf4973, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=EXCLUSIVE_GATEWAY, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@1bd6bfb0, variables={}]]
io.camunda.zeebe.engine.processing.processinstance.CreateProcessInstanceSupportedElementTest ‑ testProcessInstanceCanStartAtElementType[Scenario[type=INTERMEDIATE_CATCH_EVENT, modelInstance=io.camunda.zeebe.model.bpmn.impl.BpmnModelInstanceImpl@2a49753, variables={correlationKey=value}]]
…

♻️ This comment has been updated with latest results.

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.

Thanks @berkaycanbc 🥇

LGTM 👍

PS: 🔧 Please add a comment to the issue that is being closed by this pull request, stating that we should re-open it when we encounter a log message:

Expected to find executable process in persisted process with key '%s', but after transformation no such executable process could be found

@berkaycanbc
Copy link
Contributor Author

bors merge

@ghost
Copy link

ghost commented Apr 3, 2023

Build succeeded:

@ghost ghost merged commit 39ba69c into main Apr 3, 2023
@ghost ghost deleted the 11414_specify_an_error_message_when_deployed_process_id_not_found_in_state branch April 3, 2023 15:43
@backport-action
Copy link
Collaborator

@backport-action
Copy link
Collaborator

ghost pushed a commit that referenced this pull request Apr 19, 2023
12219: [Backport stable/8.0] refactor(engine): specify an error message when deployed process id not found in state r=berkaycanbc a=backport-action

# Description
Backport of #12196 to `stable/8.0`.

relates to #11414

Co-authored-by: berkaycanbc <berkay.can@camunda.com>
ghost pushed a commit that referenced this pull request Apr 19, 2023
12220: [Backport stable/8.1] refactor(engine): specify an error message when deployed process id not found in state r=berkaycanbc a=backport-action

# Description
Backport of #12196 to `stable/8.1`.

relates to #11414

Co-authored-by: berkaycanbc <berkay.can@camunda.com>
ghost pushed a commit that referenced this pull request Apr 20, 2023
12220: [Backport stable/8.1] refactor(engine): specify an error message when deployed process id not found in state r=berkaycanbc a=backport-action

# Description
Backport of #12196 to `stable/8.1`.

relates to #11414

Co-authored-by: berkaycanbc <berkay.can@camunda.com>
ghost pushed a commit that referenced this pull request Apr 20, 2023
12220: [Backport stable/8.1] refactor(engine): specify an error message when deployed process id not found in state r=oleschoenburg a=backport-action

# Description
Backport of #12196 to `stable/8.1`.

relates to #11414

12429: [Backport stable/8.1] test(qa): save logs of zeebe containers if the test fails r=oleschoenburg a=backport-action

# Description
Backport of #12428 to `stable/8.1`.

relates to #12396

12468: [Backport 8.1]: skip unnecessary blacklist check r=oleschoenburg a=Zelldon

## Description

Backport  #12306
<!-- Please explain the changes you made here. -->

## Related issues

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

closes to #12041



Co-authored-by: berkaycanbc <berkay.can@camunda.com>
Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
Co-authored-by: Meggle (Sebastian Bathke) <sebastian.bathke@camunda.com>
ghost pushed a commit that referenced this pull request Apr 20, 2023
12220: [Backport stable/8.1] refactor(engine): specify an error message when deployed process id not found in state r=oleschoenburg a=backport-action

# Description
Backport of #12196 to `stable/8.1`.

relates to #11414

Co-authored-by: berkaycanbc <berkay.can@camunda.com>
@lenaschoenburg lenaschoenburg added the version:8.1.11 Marks an issue as being completely or in parts released in 8.1.11 label Apr 21, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version:8.1.11 Marks an issue as being completely or in parts released in 8.1.11
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unhandled NoSuchElementException when looking for executable process while deploying BPMN resource
5 participants