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

Cancelation of order jobs is not working stable #253

Closed
jzbmw opened this issue Nov 2, 2023 · 4 comments
Closed

Cancelation of order jobs is not working stable #253

jzbmw opened this issue Nov 2, 2023 · 4 comments
Assignees
Labels
bug Something isn't working linked_to_feature Issue is linked to a feature

Comments

@jzbmw
Copy link
Contributor

jzbmw commented Nov 2, 2023

Description

While testing TRI-1636 an issue with cancelation of order jobs was detected.

Current behaviour

Requests for cancelation of order-jobs are mostly responsed with 500.

Expected behavior

Request for cancelation of existing order-jobs by correct order-job-id can be done successfully with desired result.

Steps to reproduce the Bug

DEV

@jzbmw jzbmw added this to IRS Nov 2, 2023
@jzbmw jzbmw moved this to inbox in IRS Nov 2, 2023
@jzbmw jzbmw added the bug Something isn't working label Nov 2, 2023
@jzbmw
Copy link
Contributor Author

jzbmw commented Nov 8, 2023

@mkanal
Copy link
Contributor

mkanal commented Nov 15, 2023

The functionality is currently used by any business app. So the severity is set to low.

@mkanal mkanal moved this from backlog to next in IRS Nov 15, 2023
@ds-ext-kmassalski ds-ext-kmassalski self-assigned this Dec 4, 2023
@ds-ext-kmassalski ds-ext-kmassalski moved this from next to wip in IRS Dec 4, 2023
@ds-ext-kmassalski ds-ext-kmassalski moved this from wip to review in IRS Dec 7, 2023
@ds-alexander-bulgakov ds-alexander-bulgakov self-assigned this Dec 8, 2023
@ds-alexander-bulgakov
Copy link
Contributor

@ds-ext-kmassalski i was not able to reproduce the 500 anymore but still the cancelation seems to not work completely as expected. I believe not the whole order is canceled but only the first batch so the rest starts running after.
See for example this case:

  • Order-job with 33 parts and 3 batches has been started at 10:25:34 GMT and canceled with 200 at at 10:25:41 GMT, orderId d9a6cd1c-1e8d-4b92-8d34-6f406f2a0dc3.
  • The first batch has been canceled as expeted, see https://irs.dev.demo.catena-x.net/irs/orders/d9a6cd1c-1e8d-4b92-8d34-6f406f2a0dc3/batches/ece25b43-968d-40eb-8f4d-5a885c520656.
  • The second batch however seems to not been affected since some jobs started to run just after the cancelation, see https://irs.dev.demo.catena-x.net/irs/orders/d9a6cd1c-1e8d-4b92-8d34-6f406f2a0dc3/batches/c25d1600-d972-4102-91c1-d54cbc56502b:
    { "orderId": "d9a6cd1c-1e8d-4b92-8d34-6f406f2a0dc3", "batchId": "c25d1600-d972-4102-91c1-d54cbc56502b", "batchNumber": 2, "batchTotal": 3, "totalJobs": 23, "startedOn": "2023-12-08T10:25:42.231020725Z", "completedOn": "2023-12-08T10:28:23.45123182Z", "jobs": [
    { "id": "a2b81845-f0c9-4b6c-b203-66f1d5f71cd1", "state": "COMPLETED", "startedOn": "2023-12-08T10:25:41.978882226Z", "completedOn": "2023-12-08T10:25:59.268127481Z" },
    { "id": "5a7c0c2b-990f-4949-a331-ac174208170f", "state": "COMPLETED", "startedOn": "2023-12-08T10:25:42.005030386Z", "completedOn": "2023-12-08T10:26:21.722231353Z" },
    { "id": "0729dd00-5687-4cac-9253-f45b185bb010", "state": "COMPLETED", "startedOn": "2023-12-08T10:25:42.027850875Z", "completedOn": "2023-12-08T10:26:21.82127798Z" },
    { "id": "11db1f52-d868-4bb1-80d6-506bdc8ff00c", "state": "COMPLETED", "startedOn": "2023-12-08T10:25:42.051992992Z", "completedOn": "2023-12-08T10:28:23.435121393Z" }, ...
  • The third batch did not even start, see https://irs.dev.demo.catena-x.net/irs/orders/d9a6cd1c-1e8d-4b92-8d34-6f406f2a0dc3/batches/c4d4c31e-f4b9-43e3-8909-404940dae922:
    { "orderId": "d9a6cd1c-1e8d-4b92-8d34-6f406f2a0dc3", "batchId": "c4d4c31e-f4b9-43e3-8909-404940dae922", "batchNumber": 3, "batchTotal": 3, "totalJobs": 23, "startedOn": null, "completedOn": null, "jobs": [], "jobsInBatchChecksum": 3, "batchProcessingState": "INITIALIZED" }

Could you please have a look?

ds-jhartmann pushed a commit that referenced this issue Dec 8, 2023
feat(impl):[#253] fix cancelation bug, when job has no id before save
@ds-alexander-bulgakov
Copy link
Contributor

ds-alexander-bulgakov commented Dec 11, 2023

The fix was partly successful. Cancelation during the first batch is running is done as expected. The CANCEL request affect the whole order now. Jobs in already started batched change the status to CANCELED, the batch itself get status PARTIAL. The next batches don´t even start and remain in status INITIALIZED.

Cancelation after the first batch is done however is not executed as expected. Currently the rest of batches is still executed after the cancelation request. IMO we should have a look again on this @ds-ext-kmassalski.
See example:
After the first two batches COMPLETED the order has been requested for CANCELATION at 11:12:05 GMT:
image
The third batch however is still running without any interference:
image

@jzbmw jzbmw moved this from review to done in IRS Dec 11, 2023
@jzbmw jzbmw closed this as completed Dec 11, 2023
ds-jhartmann pushed a commit that referenced this issue Dec 13, 2023
feat(impl):[#253] publish batch finish event only when its completed/…
ds-jhartmann pushed a commit that referenced this issue Jan 15, 2024
@mkanal mkanal added the linked_to_feature Issue is linked to a feature label Jan 15, 2024
ds-jhartmann pushed a commit that referenced this issue Feb 22, 2024
ds-jhartmann pushed a commit that referenced this issue Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linked_to_feature Issue is linked to a feature
Projects
Status: done
Development

No branches or pull requests

4 participants