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

Fix URL - use /api/v1 instead of /api/v2 #143

Merged
merged 1 commit into from
May 6, 2024

Conversation

maks-rafalko
Copy link
Contributor

If I use /api/v2 as stated in documentation, I get the following error:

Error: timeout of 30000ms exceeded
URL: http://localhost:8080/api/v2/superadmin_personal/item/b6bd3553-19db-4e23-9f72-77f9c8cddfb4
method: POST
    at /home/maksrafalko/apps/nodejs/fxpro/payments-e2e/node_modules/@reportportal/client-javascript/lib/rest.js:41:15
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: timeout of 30000ms exceeded
URL: http://localhost:8080/api/v2/superadmin_personal/item/b6bd3553-19db-4e23-9f72-77f9c8cddfb4
method: POST
    at /home/maksrafalko/apps/nodejs/fxpro/payments-e2e/node_modules/@reportportal/client-javascript/lib/rest.js:41:15
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: timeout of 30000ms exceeded
URL: http://localhost:8080/api/v2/superadmin_personal/item/b6bd3553-19db-4e23-9f72-77f9c8cddfb4
method: POST
    at /home/maksrafalko/apps/nodejs/fxpro/payments-e2e/node_modules/@reportportal/client-javascript/lib/rest.js:41:15
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

With /api/v1 everything works as expected.

Please note that in the examples repository, /api/v1 is used:

https://github.com/reportportal/examples-js/blob/d9c8669cd5d36e357ae4d1e0e9136b4ea4777045/example-jest/jest.config.js#L10

If I use `/api/v2` as stated in documentation, I get the following error:

```
Error: timeout of 30000ms exceeded
URL: http://localhost:8080/api/v2/superadmin_personal/item/b6bd3553-19db-4e23-9f72-77f9c8cddfb4
method: POST
    at /home/maksrafalko/apps/nodejs/fxpro/payments-e2e/node_modules/@reportportal/client-javascript/lib/rest.js:41:15
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: timeout of 30000ms exceeded
URL: http://localhost:8080/api/v2/superadmin_personal/item/b6bd3553-19db-4e23-9f72-77f9c8cddfb4
method: POST
    at /home/maksrafalko/apps/nodejs/fxpro/payments-e2e/node_modules/@reportportal/client-javascript/lib/rest.js:41:15
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: timeout of 30000ms exceeded
URL: http://localhost:8080/api/v2/superadmin_personal/item/b6bd3553-19db-4e23-9f72-77f9c8cddfb4
method: POST
    at /home/maksrafalko/apps/nodejs/fxpro/payments-e2e/node_modules/@reportportal/client-javascript/lib/rest.js:41:15
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
```

With `/api/v1` everything works as expected.

Please note that in the examples repository, `/api/v1` is used:

https://github.com/reportportal/examples-js/blob/d9c8669cd5d36e357ae4d1e0e9136b4ea4777045/example-jest/jest.config.js#L10
@AmsterGet
Copy link
Member

Hello @maks-rafalko !
Thanks for your PR.
Do you see any errors on API service side that may cause such a long processing of requests?
We've recently updated the base URL in readme to v2 as the requests within it are processed asynchronous on API side that means the higher throughput.
It would be helpful to understand this behavior on API service side in your case.

@maks-rafalko
Copy link
Contributor Author

I didn't notice anything, but if you can advice anything I can test - I will try to help. I've installed RP locally using docker compose, so probably I can enable debug and see the logs?

@AmsterGet
Copy link
Member

What is your ReportPortal version?
I also need to consult with my colleagues.
@irynakozak2, @hlebkanonik do you have any idea why the API service can be slowed down within v2 endpoints?
What info can we request here to investigate?

@maks-rafalko in the meantime, just in case, let's revert to v1 in docs as a default one.

@AmsterGet AmsterGet merged commit a878b89 into reportportal:develop May 6, 2024
2 checks passed
@maks-rafalko maks-rafalko deleted the patch-1 branch May 6, 2024 15:33
@maks-rafalko
Copy link
Contributor Author

What is your ReportPortal version?

If I understand it correctly, it's 5.11.1.

I downloaded this docker compose file (https://raw.githubusercontent.com/reportportal/reportportal/master/docker-compose.yml) and use it with docker compose up ... - that's all what I do.

And then, I configured Jest reporter as shown in this repository. So it's pretty simple to reproduce the issue.

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.

2 participants