Skip to content

[Bug][Github GraphQL] Deleted or transferred issues leave stale local rows after #8637 #8819

@squatboy

Description

@squatboy

Search before asking

What happened

GitHub GraphQL issue refresh no longer fails immediately on Could not resolve to an Issue after #8637, but deleted or transferred issues can still leave stale local rows in DevLake.

Those stale rows remain eligible for future refresh attempts because the local _tool_github_issues and raw rows are not cleaned up when the source issue no longer resolves.

In the reproduced case, a previously collected GitHub issue was deleted from the source repository. DevLake had already collected it into local tables, and later refresh attempts still tried to resolve it through GitHub GraphQL.

What do you expect to happen

When GitHub GraphQL returns Could not resolve to an Issue for an issue in the refresh-open-issues path, DevLake should:

  1. continue processing the rest of the batch
  2. remove or tombstone the stale local issue rows that keep the missing issue in the refresh path
  3. avoid retrying the same orphaned issue forever

How to reproduce

  1. Create a GitHub issue in repository A
  2. Run a DevLake pipeline that collects GitHub issues for repository A
  3. Delete the GitHub issue from repository A, or transfer it to another repository
  4. Re-run the DevLake pipeline
  5. Observe that DevLake still has stale local rows for the old issue and continues to encounter the missing issue in the refresh path

Anything else

Related upstream fix:

The remaining gap seems to be stale local data cleanup rather than just skipping the GraphQL error.

Version

Reproduced on v1.0.3-beta9@1410838

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/pluginsThis issue or PR relates to pluginspriority/highThis issue is very importantseverity/p1This bug affects functionality or significantly affect uxtype/bugThis issue is a bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions