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

error when hit GET /get_plan using API v2 #39

Open
indraaristya opened this issue Feb 6, 2023 · 29 comments
Open

error when hit GET /get_plan using API v2 #39

indraaristya opened this issue Feb 6, 2023 · 29 comments

Comments

@indraaristya
Copy link

500 status code error was occurred when I tried to hit /get_plan endpoint.
Body response: Undefined property: stdClass::$dataset_id

{
    "error": "Undefined property: stdClass::$dataset_id"
}
@shaheelroshankhan
Copy link

shaheelroshankhan commented Feb 6, 2023

I'm also hitting the same. Other APIs are working fine
APIError: TestRail API returned HTTP 500 ({'error': 'Undefined property: stdClass::$dataset_id'})

@bdfariello
Copy link

We're seeing the same in our TestRail Cloud instance

TestRail version: 7.8.0 Default (1136)
Built On: 1/25/2023
Database version: 20230105013501

We only started noticing it today

@Moriarty16
Copy link

The same error while querying "api/v2/get_plan": "error": "Undefined property: stdClass::$dataset_id"

@bdfariello
Copy link

Something else I noticed today - we have some api/v2/get_plan/{plan_id} requests working successfully, while others do not

It seems like there was an attribute change in the back-end Test Plan objects, and so Plans created BEFORE we got this update trigger this bug, while Plans created AFTER we got this update do NOT trigger the bug.

@sf0319
Copy link

sf0319 commented Feb 9, 2023

Just wanted to pile to try and get more attention to this issue. I am seeing the exact same error for our instance as well since updating to TestRail version: 7.8.0 Default (1136).

@indraaristya
Copy link
Author

Something else I noticed today - we have some api/v2/get_plan/{plan_id} requests working successfully, while others do not

It seems like there was an attribute change in the back-end Test Plan objects, and so Plans created BEFORE we got this update trigger this bug, while Plans created AFTER we got this update do NOT trigger the bug.

I've tried to update the test plan (only change the name) and save it then api/v2/get_plan/{plan_id} works perfectly again. Thanks!

@indraaristya
Copy link
Author

[UPDATE]

You guys might need to update the test plan, try to change the name only or else and save it. The api/v2/get_plan/{plan_id} endpoint should be working fine after that. I've tried mine and it's works.

@sf0319
Copy link

sf0319 commented Feb 10, 2023

@indraaristya I wouldn't say that this issue is Resolved (or ready to be closed) just because there is a workaround. I would appreciate it if this bug was re-opened so that Gurock could address it and make a proper fix.

@indraaristya
Copy link
Author

@indraaristya I wouldn't say that this issue is Resolved (or ready to be closed) just because there is a workaround. I would appreciate it if this bug was re-opened so that Gurock could address it and make a proper fix.

Sure, done.

@indraaristya indraaristya reopened this Feb 10, 2023
@Moriarty16
Copy link

4 days ago, request for plan A via this API fails, today the same request for plan A is successful.
However, request for another plan B still fails with the same error today.

@bdfariello
Copy link

bdfariello commented Feb 13, 2023 via email

@SarLecobee
Copy link

Also started noticing this issue today.

@patrick-cichon-gcx
Copy link

We're also having the same issue since approximately a week

@justinokoli
Copy link

justinokoli commented Feb 16, 2023

We are having this issues since a week now, all our operations are halted and we are considering next step with testrail

@jbrekesJC
Copy link

We have the same problem in my company since 2023-02-07, and I don't think that editing old plans would be so practical since we would have more than 2000 plans to change.

@jnowo
Copy link

jnowo commented Feb 27, 2023

I have the same problem since ~2023-02-20

@Moriarty16
Copy link

The issue has been reported to TestRail 3 weeks ago, they confirmed it can be reproduced internally. But the issue has not been fixed so far...

@Moriarty16
Copy link

Moriarty16 commented Mar 3, 2023

It is said "There is no ETA for to bug but the fix will soon be released, most likely in the next TestRail update or the next two version upgrades".

So we may have to use the workaround for now until the new release fixes the issue.

@jon-waite-tgcs
Copy link

This is bad, it is blocking our reporting as an organization. Test Rail APIs are already overly verbose and nested, and now they do not work.

@jnowo
Copy link

jnowo commented Mar 10, 2023

For me it started working fine since yesterday. I don't get any errors with dataset_id now.

@Moriarty16
Copy link

@jnowo As we tested earlier, we may fail to fetch data for some projects earlier, but then later we can successfully get the data for those projects. However, as I checked just now, I still get the same errors for some projects.
The issue is not fixed yet.

@shaheelroshankhan
Copy link

shaheelroshankhan commented Mar 10, 2023 via email

@Moriarty16
Copy link

Moriarty16 commented Mar 20, 2023

Possible workaround:

  1. Get all the plans via get_plans/{project_id}
  2. Loop all the plans, use try-catch to get all the plans with the "Undefined property: stdClass::$dataset_id" issue
  3. For all the plans with the issue, change the plan names(maybe add _temp to the end of the plan name) via update_plan/{plan_id}, refer to update_plan
  4. Change these plans to their original names
  5. Query the data of these plans again, the issue should be fixed.

Note: This is just a possible workaround, as I haven't tested the API update_plan/{plan_id}, we only know if we manually update the plan name(add suffix and change back), then the http request will be fine.

Pls ignore the above comments, stupid I'm. Just realize, if there is an error in the request, we cannot get the plan name via API.

@ziadtawfeek
Copy link

@Moriarty16
Copy link

Moriarty16 commented Mar 20, 2023

Actually we've heard the the issue should have been fixed within the above update, but the issue remains unfixed.
And as I tested locally, the issue hasn't been fix at this moment.
We've synced with TestRail again, waiting for their update.

@Moriarty16
Copy link

Moriarty16 commented Apr 4, 2023

We found the issue about 2 months ago, just tried locally, this issue can still be reproduced now.
Unbelievable, is this bug so complex that it need several months to fix......

@jbrekesJC
Copy link

This bug is really complicating some of our processes. Still no news on the solution?

@Moriarty16
Copy link

Moriarty16 commented Apr 21, 2023

They sueggest us to create freash projects, manually create fresh TestRun, TestCases, without any import(To confirm some assumptions).
The current plans we're testing are possibly corrupt, according to the recent conversations with them.

So the only solution for us is: Write a script to list all the current test plans in all the projects, then make requests to all the plans via API, record all the plans with this issue. Finally make the workaround to all these plans(rename) manually.

@Moriarty16
Copy link

Now we're used a script to list all the plans with this issue, then run the workaround(rename, save, and rename back) on each of these plans one by one.
Now we can access all the plans via API...

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

No branches or pull requests