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

Launches left IN_PROGRESS and break merge #53

Closed
owens-ben opened this issue Nov 16, 2023 · 6 comments · Fixed by #39
Closed

Launches left IN_PROGRESS and break merge #53

owens-ben opened this issue Nov 16, 2023 · 6 comments · Fixed by #39
Assignees
Labels
bug Something isn't working
Milestone

Comments

@owens-ben
Copy link

owens-ben commented Nov 16, 2023

I'm seeing an intermittent issue where merges are failing because one launch is apparently left open.

Error: Request failed with status code 406: {"errorCode":4063,"message":"Unable to perform operation for non-finished launch. Cannot merge launch '827' with status 'IN_PROGRESS'"}
URL: https://reportportal-api.jabraenhance.com/api/v1/JE_WEB/launch/merge
method: POST
    at /Users/myuser/git/dev-bundle/web/test/node_modules/@reportportal/client-javascript/lib/rest.js:41:15
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.onComplete (/Users/myuser/git/dev-bundle/web/test/configs/wdio.shared.conf.js:187:9)
    at async file:///Users/myuser/git/dev-bundle/web/test/node_modules/@wdio/cli/build/utils.js:101:13
    at async Promise.all (index 0)
    at async Launcher.run (file:///Users/myuser/git/dev-bundle/web/test/node_modules/@wdio/cli/build/launcher.js:111:39)
    at async Module.run (file:///Users/myuser/git/dev-bundle/web/test/node_modules/@wdio/cli/build/run.js:64:20)
Launches successfully merged!

I tried adding an explicit wait in case there was a race condition and it was trying to merge before the API had closed the last launch, but that doesn't help.

Using the debugger, I'm unable to reproduce it.

@owens-ben
Copy link
Author

It would also be good to be able to block publshing in the event of a failed merge. I don't ever want unmerged launches in my dashboards.

@AmsterGet
Copy link
Member

AmsterGet commented Nov 20, 2023

Hi @owens-ben !
Looks similar to #45.
Please try to increase the interval that wdio uses for reporter to wait until it finishes all it internals (like in this issue #52).
In a few days I plan to release the new version of this agent that will support existing launch id. In this case the approach described here can be used to combine tests into a single launch without performing a merge operation.

It would also be good to be able to block publshing in the event of a failed merge. I don't ever want unmerged launches in my dashboards.

What do you expect, deletion of not finished launches from RP side?
I assume that it is not the agent or RP responsibility. Agent is just a client that pushes data and RP holds it. In case the agent doesn't send the finish request for some reason, if its unexpected, it should be fixed as a defect within the agent and test framework reporting system.
I suppose that there will be no such issue in case you are using the approach with existing launch id.

@AmsterGet AmsterGet self-assigned this Nov 20, 2023
@owens-ben
Copy link
Author

owens-ben commented Nov 21, 2023

hi @AmsterGet thanks for replying. I tried increasing the interval to 30 seconds and still saw the issue again. It's intermittent so it's a little difficult to debug.

As for the agent update I'm looking forward to that. I'm learning now about how to start a launch via the js client and save it for later. If you have it working on a branch I'd be happy to help test it

@owens-ben
Copy link
Author

Hi, I am just getting back from holiday, is there any update here?

@AmsterGet
Copy link
Member

Fixed in version 5.1.0.

@vishal14121996
Copy link

Fixed in version 5.1.0.

Hi @AmsterGet,

I'm facing the same issue, when i'm executing the test, if the test getting failed, so for that test -launch will continuosly shows as in-progress..

Adding the debug logs & Screenshots for the same..

[0-0] Start launch with tempId sktwi10i7lzctpv6r {
[0-0] description: 'This is execution of CG Wdio Automation Test',
[0-0] attributes: [
[0-0] {
[0-0] key: 'agent',
[0-0] value: '@reportportal/agent-js-webdriverio|5.1.1',
[0-0] system: true
[0-0] }
[0-0] ],
[0-0] rerun: undefined,
[0-0] rerunOf: undefined,
[0-0] mode: 'DEFAULT',
[0-0] id: undefined
[0-0] }
[0-0] Success start launch with tempId sktwi10i7lzctpv6r { id: '48c13089-cfce-488a-99f2-629d453128b9', number: 51 }
[0-0] Start test item with tempId sktwi10i7lzctpv79 {
[0-0] startTime: 1722610337589,
[0-0] name: 'Suite to validate the login Page on qa',
[0-0] type: 'SUITE',
[0-0] codeRef: 'specs/customerSite/login_test.js/Suite to validate the login Page on qa',
[0-0] testCaseId: 'specs/customerSite/login_test.js/Suite to validate the login Page on qa',
[0-0] launchUuid: '48c13089-cfce-488a-99f2-629d453128b9'
[0-0] }
[0-0] Success start item with tempId sktwi10i7lzctpv79 {
[0-0] id: '459f2c21-7d62-4bb5-9f31-f905f0945a1d',
[0-0] uniqueId: 'auto:792742fe20bb9b9cc012693fbcfe3ce6'
[0-0] }
[0-0] Start test item with tempId sktwi10i7lzctpv7c {
[0-0] startTime: 1722610337591,
[0-0] name: 'Test Case to validate login screen when no credentials are entered',
[0-0] type: 'STEP',
[0-0] codeRef: 'specs/customerSite/login_test.js/Suite to validate the login Page on qa/Test Case to validate login screen when no credentials are entered',
[0-0] parameters: [ { key: 'browser', value: 'chrome.127_0_6533_89.mac' } ],
[0-0] testCaseId: 'specs/customerSite/login_test.js/Suite to validate the login Page on qa/Test Case to validate login screen when no credentials are entered[chrome.127_0_6533_89.mac]',
[0-0] launchUuid: '48c13089-cfce-488a-99f2-629d453128b9'
[0-0] }
[0-0] Success start item with tempId sktwi10i7lzctpv7c {
[0-0] id: 'd5f275c7-7c9d-462f-92a5-eb1dbd5e2be1',
[0-0] uniqueId: 'auto:419da67ec3279d23c195246fd40330de'
[0-0] }
[0-0] Finish all children for test item with tempId sktwi10i7lzctpv79
[0-0] 2024-08-02T14:54:35.157Z ERROR @wdio/runner: Error: Some reporters are still unsynced: Reporter
[0-0] at Timeout. (file:///Users/vishaltyagi/Documents/Project/automation-cg/wdio_e2e/node_modules/@wdio/runner/build/reporter.js:111:35)
[0-0] at listOnTimeout (node:internal/timers:573:17)
[0-0] at process.processTimers (node:internal/timers:514:7)
[0-0] FAILED in chrome - file:///specs/customerSite/login_test.js
Total Passed TCs --> 0
Test run complete. Attempting to merge launches.
Find launches with UUIDs to merge: 48c13089-cfce-488a-99f2-629d453128b9
Found launches: 182 [
{
owner: 'superadmin',
description: 'This is execution of CG Wdio Automation Test',
id: 182,
uuid: '48c13089-cfce-488a-99f2-629d453128b9',
name: 'cg_wdio_launch',
number: 51,
startTime: 1722610337570,
lastModified: 1722610338288,
status: 'IN_PROGRESS',
statistics: { executions: {}, defects: {} },
attributes: [],
mode: 'DEFAULT',
analysing: [],
approximateDuration: 105.6416,
hasRetries: false,
rerun: false
}
]
Merge launches with ids: 182 {
launches: [ 182 ],
mergeType: 'BASIC',
description: 'This is execution of CG Wdio Automation Test',
mode: 'DEFAULT',
name: 'cg_wdio_launch',
attributes: undefined,
endTime: 1722610475839,
extendSuitesDescription: true
}
Error merging launches with UUIDs: 48c13089-cfce-488a-99f2-629d453128b9 Error: Request failed with status code 406: {"errorCode":4063,"message":"Unable to perform operation for non-finished launch. Cannot merge launch '182' with status 'IN_PROGRESS'"}
URL: http://10.1.1.232:8080/api/v1/cg_wdio/launch/merge
method: POST
at /Users/vishaltyagi/Documents/Project/automation-cg/wdio_e2e/node_modules/@reportportal/client-javascript/lib/rest.js:43:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.onComplete (file:///Users/vishaltyagi/Documents/Project/automation-cg/wdio_e2e/wdio.conf.js:531:17)
at async file:///Users/vishaltyagi/Documents/Project/automation-cg/wdio_e2e/node_modules/@wdio/cli/build/utils.js:101:13
at async Promise.all (index 0)
at async Launcher.run (file:///Users/vishaltyagi/Documents/Project/automation-cg/wdio_e2e/node_modules/@wdio/cli/build/launcher.js:110:39)
Error: Request failed with status code 406: {"errorCode":4063,"message":"Unable to perform operation for non-finished launch. Cannot merge launch '182' with status 'IN_PROGRESS'"}
URL: http://10.1.1.232:8080/api/v1/cg_wdio/launch/merge
method: POST
at /Users/vishaltyagi/Documents/Project/automation-cg/wdio_e2e/node_modules/@reportportal/client-javascript/lib/rest.js:43:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.onComplete (file:///Users/vishaltyagi/Documents/Project/automation-cg/wdio_e2e/wdio.conf.js:531:17)
at async file:///Users/vishaltyagi/Documents/Project/automation-cg/wdio_e2e/node_modules/@wdio/cli/build/utils.js:101:13
at async Promise.all (index 0)
at async Launcher.run (file:///Users/vishaltyagi/Documents/Project/automation-cg/wdio_e2e/node_modules/@wdio/cli/build/launcher.js:110:39)
Screenshot 2024-08-02 at 11 01 55 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants