[Refactor][CircleCI] Make extractJobs and extractWorkflows incremental with NewStatefulApiExtractor
I maintainer di solito rispondono entro 2 giorni
@zahorniak ci sta già lavorando.
Dal 2/11/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
What and why to refactor
The CircleCI extractors extractJobs and extractWorkflows use the old api.NewApiExtractor. This extractor reads all rows of the raw table on every run, also on incremental runs. The GitHub, GitLab, Jira and YouTrack plugins already use api.NewStatefulApiExtractor, which reads only the raw rows added since the last successful run.
So the time for each run grows with the size of the raw table, not with the new CI activity. In our instance:
_raw_circleci_api_jobs |
about 9.3M rows (10.3 GB) |
| New raw rows per night | about 166k (almost all from the problem in #9304) |
extractJobs speed |
about 490 rows/s with default MySQL settings |
extractJobs time per run |
about 4.5 hours for one project, every night |
The job extraction writes one row per commit. It uses almost no CPU on the DevLake or MySQL side; the disk sync on each commit sets the speed.
Environment: DevLake v1.0.3-beta14 (the code is the same on main at 351d86738), MySQL 8.4, CircleCI Cloud, nightly incremental blueprint.
Describe the solution you'd like
Change ExtractJobs (backend/plugins/circleci/tasks/job_extractor.go) and ExtractWorkflows (backend/plugins/circleci/tasks/workflow_extractor.go) to api.NewStatefulApiExtractor, the same way as other plugins (for example backend/plugins/github/tasks/pr_extractor.go).
- On an incremental run, the extractor reads only raw rows with
created_at >= since. - On a full sync, or when the configuration changes, it reads all raw rows, as it does now.
- Duplicate raw rows for the same job are safe: the tool-layer key is
(connection_id, workflow_id, id)for jobs and(connection_id, id)for workflows, so a newer row replaces the older one. - Add or update the e2e tests for the two extractors.
With #9304 fixed and this change, extractJobs in our instance would read about 20k rows per night, not 9.3M.
I can start work on a PR for this if the DevLake maintainers approve this approach.
Related issues
- #9304: the "unfinished details" collectors collect the same jobs again without a limit.
- #8907, #8956: earlier fixes in the same collectors.
Additional context
A one-time cleanup of the duplicate raw rows is not part of this change. After both fixes, a full sync removes the old raw rows.
- Lingua principale
- Go
- Stelle
- 3.2k
- Fork
- 832
- Merge medio
- 1g 22h
- PR unite (30g)
- 75
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/devlake
-
[Bug][linker] LinkPrToIssue never matches lowercase issue keys (e.g. in branch names)Forse già presa @VictorColomb l’ha presa 2 giorni fa. Apertatype/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/devlake#9283 · 1 commento · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
I maintainer di solito rispondono entro 2 giorni
-
[Bug][Tempo] Team pagination relies on metadata.total, which Tempo v4 doesn't return: only the first 50 teams are listed/collectedForse già presa @ShivamSharma43 l’ha presa 1 giorno fa. Aperta
Difficoltà 3/5 Mezza giornata Idoneità per principianti 25/100
I maintainer di solito rispondono entro 2 giorni
-
[Bug][CircleCI] collectJobs and collectWorkflows collect on_hold workflows again on every run, so the raw tables grow without a limitForse già presa @zahorniak l’ha presa 1 giorno fa. Aperta
apache/devlake#9304 · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug][Tempo] Ingestion issue on teamsForse già presa @Goldloli l’ha presa 1 giorno fa. Apertatype/bug
Difficoltà 3/5 Mezza giornata Idoneità per principianti 73/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di apache/devlake
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Schema validation is skipped when a transaction is invoked with a lowercase first letterForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
-
cmd/ebitenmobile: multi-language bindings run the complete generator twiceForse già presa @kumagi l’ha presa oggi. Apertaos:macos performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
hajimehoshi/ebiten#4011 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
agent-butler-finding chore
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
jordansmall/spindrift#6318 ·
I maintainer di solito rispondono entro 1 giorno