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

com.epam.reportportal.service.ReportPortal.Builder.buildEndpointUrl assumes all endpoints should be in v2 when running with async reporting #145

Closed
tzahialt opened this issue Feb 23, 2021 · 4 comments
Assignees
Milestone

Comments

@tzahialt
Copy link

tzahialt commented Feb 23, 2021

com.epam.reportportal.service.ReportPortal.Builder.buildEndpointUrl assumes all endpoints should be in v2 when running with async reporting.
This is not true for endpoints such as com.epam.reportportal.service.ReportPortalClient#getLaunchByUuid. Trying to invoke it when com.epam.reportportal.listeners.ListenerParameters#isAsyncReporting is true, results in HTTP error 404, due to the incorrect use of API_V2_BASE.

In my specific scenario, I found a work-around, in the form of creating a separate ReportPortalClient with a clone of my ListenerParameters, where i tweaked setAsyncReporting(false), so i was able to successfully invoke com.epam.reportportal.service.ReportPortalClient#getLaunchByUuid from this dedicated client.

@HardNorth HardNorth self-assigned this Mar 1, 2021
@HardNorth HardNorth added this to the 5.1 milestone Mar 1, 2021
@HardNorth
Copy link
Member

@tzahialt I just released new version of the client, where this issue is addressed:
https://github.com/reportportal/client-java/releases/tag/5.1.0-BETA-1

@HardNorth
Copy link
Member

And I'm going to add more API V1 endpoints late.

@amalbaccar-hub
Copy link

amalbaccar-hub commented Apr 18, 2024

Hello @HardNorth

Faced similar issue : got 404 for getLaunchByUuid for v1 (I'm using this agent 'com.epam.reportportal:agent-java-cucumber2:5.1.5'):

Response{protocol=http/1.1, code=404, message=Not Found, url=http://rp-url/api/v1/superadmin_personal/launch/uuid/5cfcf5aa-5cdd-4ca5-ac96-7176f22e6133}

Could you please add endpoints to V1

@HardNorth
Copy link
Member

@amalbaccar-hub, this is V1 only endpoint. So please check how you obtain this UUID. Also, Launch creation is async process, so you have to implement some sort of waiter, if you call for the Launch info on the very start.

PS: Please do not post in to such an old issue. I any case this will be off-topic.

@reportportal reportportal locked as resolved and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants