[Question][GitHub] PR records remain duplicated and stale after a repository is moved between GitHub connections
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- github, graphql
- Área
- analytics, data-engineering, databases
Línea de trabajo
El issue identifica la tabla pull_requests, el plugin github_graphql, project blueprints y reporting queries. Empieza rastreando cómo se recopilan y asignan las identidades de repositorio y pull request asociadas a una conexión. Se considera terminado cuando se documente si se admiten la reconciliación y la limpieza, junto con un procedimiento seguro de migración o reporting.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Question
We are investigating how Apache DevLake handles repositories that are moved from one GitHub connection to another.
Our DevLake instance contains the same GitHub repository and pull request under multiple connection-scoped identities. For example, GitHub PR #137 from an example repo
is present in the pull_requests table as follows:
github:GithubPullRequest:1:3375195798 OPEN
github:GithubPullRequest:35:3375195798 MERGED
github:GithubPullRequest:36:3375195798 MERGED
github:GithubPullRequest:37:3375195798 MERGED
GitHub confirms that PR #137 was merged:
created_at: 2026-03-09T20:00:14Z
updated_at: 2026-03-10T03:38:33Z
closed_at: 2026-03-10T03:38:31Z
merged_at: 2026-03-10T03:38:31Z
The most recent pipeline for the project collected the repository through connection 35:
{
"plugin": "github_graphql",
"options": {
"connectionId": 35,
"fullName": "",
"githubId":
}
}
That pipeline correctly created or updated the connection-35 record to MERGED. However, the older connection-1 record remains OPEN and is not updated by subsequent pipeline runs.
Our reporting queries join pull requests to repositories by repository name and therefore include both the active connection-35 record and the stale connection-1 record. This results in incorrect open-PR counts unless we explicitly filter by the currently active connection-specific repository ID.
Is this behavior expected by design, or should DevLake reconcile records across GitHub connections when the same GitHub repository and pull request are collected through a different connection?
In particular:
- Is the connection ID intentionally part of the identity of a GitHub repository and pull request?
- When a repository is removed from connection
1and added to connection35, should historical records under connection1remain permanently queryable? - Should a future full-sync or backfill pipeline update the old connection-
1record, even though connection1is no longer present in the project blueprint? - Is there a supported procedure for migrating repository data between connections without creating duplicate tool-layer and domain-layer entities?
- Is there a recommended way to mark or remove obsolete connection-scoped records?
- What is the recommended query or dashboard strategy for counting PRs and identifying stale open PRs when the same repository exists under multiple connection IDs?
- Is there a supported cleanup or deduplication task that preserves related PR comments, reviews, commits, deployments, and DORA metrics?
Additional context
The project uses the GitHub GraphQL plugin and has skipOnFail enabled. The affected pipeline also experienced a separate network timeout while preparing a GitHub GraphQL task:
unable to get github API client instance
Failed to connect
dial tcp 20.26.156.210:443: i/o timeout
However, for PR #137, the active connection-35 record was successfully updated to MERGED. The issue appears specifically related to the older connection-1 record remaining stale and being included in cross-connection reporting.
The project’s sync policy is currently:
Data time range: 2026-05-07 01:00 to Now
Sync frequency: Custom
Skip failed tasks: Enabled
We would appreciate clarification on whether this is:
- expected connection-scoped identity behavior,
- a limitation of connection migration,
- a data cleanup/configuration issue,
- or a defect in the GitHub GraphQL collector, extractor, converter, or project mapping logic.
Expected outcome
We would like to understand the supported DevLake behavior and obtain guidance for:
- migrating repositories between GitHub connections,
- preventing duplicate records,
- excluding obsolete connection data from project metrics,
- and safely cleaning up stale records without corrupting related DevLake data.
- Lenguaje dominante
- Go
- Estrellas
- 3.1k
- Forks
- 812
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 51
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/devlake
-
type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
type/bug
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Todos los issues de apache/devlake
Issues similares
-
bug github_actions
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
registrystack/registry-stack#1393 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
JakeChampion/lang#10213 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
oasisprotocol/oasis-sdk#2523 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100