Add pagination for known tests API#71
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: daa97d41ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
daa97d4 to
718f75a
Compare
E2E Test Report: SUCCESSTested by: Shepherd Agent (autonomous QA for Datadog Test Optimization) Test Environment
Results
Cache VerificationThe multi-page cached Ruby parsed it through the real datadog-ci-rb cache path as: Issues FoundNo ddtest regressions found in this pass. Shepherd/mockdog needed additional scenario support to exercise known-tests pagination and page-specific failures; that support was added locally and validated with mockdog checks. Datadog UI VerificationNot applicable for this request: the behavior under test is ddtest's known-tests client pagination, local cache output, and Ruby cache compatibility using mockdog as the CI Visibility backend. Test Methodology
This E2E test was performed by Shepherd - autonomous QA agent for Datadog Test Optimization. |
What
Fix known-tests pagination in the CI Visibility client by reading backend pagination metadata from
data.attributes.page_info, sending follow-up cursors asdata.attributes.page_info.page_state, and merging tests across pages.Why
Shepherd issue https://github.com/DataDog/shepherd/issues/46 identified that known-tests clients must use the
data.attributes.page_infocontract and let the backend choose page size. ddtest already avoided top-levelpage_inforequests, but it did not followhas_nextcursors, so large known-tests responses could stop after page 1.E2E testing
Run ddtest against a CI Visibility backend or mockdog endpoint that returns known tests with
data.attributes.page_info.has_next=trueandcursor="page-2"; verify ddtest sends a second known-tests request withdata.attributes.page_info.page_state="page-2", omitspage_size, and plans with tests from both pages.Validated with
go test ./civisibility/utils/net,make test, andmake lint.