Skip to content

fix(gitlab): use stateful extractors for users and tags - #9070

Open
mfrancisc wants to merge 1 commit into
apache:mainfrom
mfrancisc:upstream/fix-gitlab-stateful-extractors
Open

fix(gitlab): use stateful extractors for users and tags#9070
mfrancisc wants to merge 1 commit into
apache:mainfrom
mfrancisc:upstream/fix-gitlab-stateful-extractors

Conversation

@mfrancisc

Copy link
Copy Markdown
Contributor

Summary

GitLab Extract Users and Extract Tags were the last GitLab extractors still using the deprecated NewApiExtractor. That helper always deletes tool-layer rows by _raw_data_table + _raw_data_params before insert.

On self-hosted GitLab, Collect Users can stop early when a page is shorter than pageSize (fetchPagesUndetermined) and still return success. The following Extract Users run then wipes accounts that project last wrote and keeps only the partial dump.

This switches both extractors to NewStatefulApiExtractor, matching MRs, notes, pipelines, and jobs:

  • incremental runs upsert instead of delete-then-insert
  • full delete still happens on first run, full refresh, or subtask config change (skipCreatedUserAt)

NewApiExtractor always deleted tool-layer rows by raw params before insert,
so a truncated Collect Users run wiped accounts. NewStatefulApiExtractor
upserts incrementally, matching the rest of the GitLab plugin.

Co-Authored-By: Cursor Grok 4.6 <noreply@example.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
mfrancisc added a commit to mfrancisc/devlake that referenced this pull request Aug 25, 2026
Upstream-Status: Submitted

Co-Authored-By: Cursor Grok 4.6 <noreply@example.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant