Skip to content

PR 목록 조회가 11 - 14초 걸려 15초 제한에 걸린다 #392

Closed

Description

@yansfil

What happened

core 로그에 pull_requests.failed가 "message":"gh timed out after 15000 ms"로 남았다.
core의 PR 조회(herdr-core/src/github.rs)는 gh pr list --state all --limit 200에 statusCheckRollup을 포함한 필드를 붙여 한 번에 묻고, 제한 시간은 15초다.

2026-10-04 이 Mac에서 같은 저장소에 대해 직접 쟀다.

조회 시간
core와 같은 필드(number,title,statusCheckRollup,headRefName,baseRefName,state,reviewDecision,isDraft,url,mergedAt,updatedAt,closingIssuesReferences) 14.02초, 14.02초, 11.47초
위에서 statusCheckRollup과 closingIssuesReferences를 뺐을 때 4.27초
위에 closingIssuesReferences만 더했을 때 4.54초
위에 statusCheckRollup만 더했을 때 12.34초
열린 PR만, statusCheckRollup 포함 1.29초
워크트리 브랜치 25개를 GraphQL alias(pullRequests(headRefName:))로 묶고 statusCheckRollup { state }만 1.38 - 1.56초

시간 대부분은 머지되거나 닫힌 PR까지 200개 전부의 체크 결과를 묻는 데서 나온다.
GraphQL 비용은 dryRun 기준 100개 페이지당 3점, alias 25개 묶음은 2점이라 한도보다 지연이 문제다.
측정은 createdAt, closedAt이 필드에 추가되기 전 목록으로 했다.

What you expected

PR 목록 조회가 제한 시간 안에 여유 있게 끝난다.

같은 계열 도구의 사례는 이렇다.

Steps to reproduce

  1. 이 저장소에서 gh pr list --state all --limit 200 --json number,title,statusCheckRollup,headRefName,baseRefName,state,reviewDecision,isDraft,url,mergedAt,updatedAt,closingIssuesReferences를 실행한다.
  2. 11 - 14초 걸린다.

Versions

  • hide: 0.1.0-main.59c947a5
  • Herdr: 0.9.1
  • macOS: 15.1
  • gh: 2.76.2

Diagnostics

{"component":"github","kind":"pull_requests.failed","generation":16,"available":true,"pull_requests":0,"message":"gh timed out after 15000 ms"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions