Skip to content

Conversation

cgeisel
Copy link
Contributor

@cgeisel cgeisel commented Aug 11, 2025

Issue being resolved: #332

Solution description

How are we solving the problem?

Updating check_suite_id to use __get_all_entities instead of __send_request to get paginated results. This PR creates a new method __get_all_suites following the pattern used by __get_all_projects and others.

Changes

What changes where made?

check_suite_id now uses __get_all_suites, which wraps __get_all_entities to get paginated results. The API for check_suite_id does not change.

Potential impacts

What could potentially be affected by the implemented changes?

Any area of the cli where check_suite_id is called, it could add latency to the call. It should not otherwise impact anything, since it is still returning a boolean if the suite id is returned.

Steps to test

Happy path to test implemented scenario

Create a project with more than a single page of suites (ie >250). Use the add_run trcli command with --suite-id for a suite in the second page of results and observe that before this is merged, the call will fail with the error "Suite with ID (some id) does not exist in TestRail."

PR Tasks

  • PR reference added to issue
  • README updated
  • Unit tests added/updated

@cgeisel
Copy link
Contributor Author

cgeisel commented Aug 11, 2025

Made this a draft while I continue working on it.

@cgeisel cgeisel force-pushed the get-suites-pagination branch from a734ec2 to 650d42d Compare August 12, 2025 18:53
@cgeisel cgeisel force-pushed the get-suites-pagination branch from 650d42d to e74e63f Compare August 14, 2025 18:44
@cgeisel cgeisel marked this pull request as ready for review August 14, 2025 18:46
@cgeisel
Copy link
Contributor Author

cgeisel commented Aug 14, 2025

This is ready for review. I updated the three functions and updated or added unit tests. When running the test suite the e2e tests all failed for me, I am not sure how to run those successfully but am willing to learn.

@acuanico-tr-galt
Copy link
Collaborator

Hi @cgeisel thank you for your patience, the changes you made looks solid. Can you point this PR to release/1.12.0? Thank you!

@cgeisel cgeisel changed the base branch from main to release/1.12.0 August 28, 2025 20:16
@cgeisel
Copy link
Contributor Author

cgeisel commented Aug 28, 2025

Repointed to release/1.12.0. Let me know if there's anything else you need and I'll jump on it.

@cgeisel
Copy link
Contributor Author

cgeisel commented Sep 3, 2025

@acuanico-tr-galt any chance you could have a look? I'm eager to stop thinking about this PR. :)

@acuanico-tr-galt
Copy link
Collaborator

Hi @cgeisel apologies for the late response. We are just closing on the tests of some other new features but rest assured ,we'll include this fix as part of the next release. Thank you for your patience!

@acuanico-tr-galt acuanico-tr-galt merged commit c9b163c into gurock:release/1.12.0 Sep 11, 2025
10 checks passed
@cgeisel
Copy link
Contributor Author

cgeisel commented Sep 12, 2025

Thanks, much appreciated.

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.

add_run with --suite-id fails to find suite in project
2 participants