Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug][Github] Some GitHub pull-request domain records are missing or remain OPEN after successful collection

Abierto
#9,150 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go

Línea de trabajo

Start with the comparison SQL query in the issue and inspect the GitHub pull-request domain conversion stage it is intended to validate. Reproduce the missing and stale records, then verify that a full sync creates every expected domain row and updates closed or merged records with the correct status and dates.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

type/bug
Search before asking
  • I had searched in the issues and found no similar issues.
What happened

The GitHub tool-layer pull-request records are current, but corresponding DevLake domain records in pull_requests are missing or remain OPEN after GitHub reports the PR as closed or merged.

This causes incorrect dashboard data despite successful GitHub collection.

Most pull requests are represented correctly in the pull_requests domain table. We found these inconsistencies while investigating a small number of dashboard records, then ran the comparison query to determine whether the behavior was isolated. The results show affected records across multiple repositories and two deployments, but do not imply that all PR conversions are failing, 60k+ are ok.

Observed in two independent deployments:

  • Deployment A: 124 affected PRs across 50 repositories: 88 missing domain records and 36 stale OPEN records.
  • Deployment B: 479 affected PRs across 55 repositories: 421 missing domain records and 58 stale OPEN records.

The GitHub tool record has the correct state and timestamps. The domain record is absent, or has status = 'OPEN' and no close/merge dates.

What do you expect to happen

After GitHub collection completes, every GitHub tool pull-request record should have a corresponding pull_requests domain record. Closed or merged GitHub PRs should not remain OPEN in the domain table, and their close/merge dates should be populated.

A full sync should reconcile previously missing or stale domain records.

How to reproduce

This query identifies closed or merged GitHub tool records whose domain representation is missing or still open. Replace [CONNECTION_ID] with the GitHub connection being investigated.

SELECT
  repo.name AS repository,
  tool_pr.number AS pull_request_number,
  tool_pr.github_id,
  tool_pr.state AS github_state,
  tool_pr.merged AS github_merged,
  tool_pr.github_updated_at,
  tool_pr.merged_at AS github_merged_at,
  tool_pr.closed_at AS github_closed_at,
  domain_pr.id AS domain_pull_request_id,
  domain_pr.status AS domain_status,
  domain_pr.original_status AS domain_original_status,
  domain_pr.merged_date AS domain_merged_date,
  domain_pr.closed_date AS domain_closed_date,
  domain_pr.updated_at AS domain_updated_at
FROM _tool_github_pull_requests AS tool_pr
LEFT JOIN pull_requests AS domain_pr
  ON domain_pr.id = CONCAT(
    'github:GithubPullRequest:',
    tool_pr.connection_id,
    ':',
    tool_pr.github_id
  )
LEFT JOIN _tool_github_repos AS repo
  ON repo.connection_id = tool_pr.connection_id
  AND repo.github_id = tool_pr.repo_id
WHERE tool_pr.connection_id = [CONNECTION_ID]
  AND (tool_pr.merged = 1 OR tool_pr.state = 'closed')
  AND (domain_pr.id IS NULL OR domain_pr.status = 'OPEN')
ORDER BY repo.name, tool_pr.number;

The expected domain ID convention is:

github:GithubPullRequest:[CONNECTION_ID]:[GITHUB_PULL_REQUEST_ID]
Anything else
Stale domain record
GitHub tool record
  state: closed
  merged: true
  merged_at: 2026-09-16 09:45:46
  closed_at: 2026-09-16 09:45:46

Domain record
  status: OPEN
  original_status: open
  merged_date: null
  closed_date: null
  updated_at: 2026-09-16 16:24:00.910
Missing domain record
GitHub tool record
  state: closed
  merged: true
  closed_at: 2026-09-16 20:55:37

Domain record
  no row exists for github:GithubPullRequest:[CONNECTION_ID]:[GITHUB_PULL_REQUEST_ID]

Question:

  • Is there a supported way to re-run or reconcile only the GitHub pull-request domain conversion stage?
Version

v1.0.3-beta17

Are you willing to submit PR?
  • Yes I am willing to submit a PR!
Code of Conduct
Lenguaje dominante
Go
Estrellas
3.2k
Forks
819
Merge medio
3 d 9 h
PR fusionados (30 d)
37

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/devlake

Todos los issues de apache/devlake

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.