Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][github] Branches do not get removed #8313

Open
2 of 3 tasks
cypher7682 opened this issue Feb 27, 2025 · 1 comment
Open
2 of 3 tasks

[Bug][github] Branches do not get removed #8313

cypher7682 opened this issue Feb 27, 2025 · 1 comment
Labels
severity/p1 This bug affects functionality or significantly affect ux type/bug This issue is a bug

Comments

@cypher7682
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

When branches are deleted in github, the lake.refs table is not updated to either A: mark the branch as deleted, or B: the branch is deleted from the table.

This causes problems when trying to detect stale branches, because it includes branches that have already been deleted/tidied up in github.

What do you expect to happen

Either:

  • Mark the branch as deleted in the lake.refs table
  • Remove the branch from the lake.refs table

How to reproduce

  • Create a repository
  • Push an additional branch to the repository
  • Scrap the repository
  • Check the lake.refs table for the repo + branches
  • Delete the branch in the github UI
  • Scrape the repository
  • Check the lake.refs table for the branch - it should still exist.

Anything else

No response

Version

devlake-1.0.2-beta1

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@cypher7682 cypher7682 added the type/bug This issue is a bug label Feb 27, 2025
Copy link

dosubot bot commented Feb 27, 2025

Hey @cypher7682! 👋 I'm here to help you with any bugs, questions, or contributions you have for the project. I'll assist you while we wait for a human maintainer.

The issue you're encountering is related to the lake.refs table not being updated to reflect branch deletions from GitHub. Currently, there is no field in the lake.refs table specifically designed to mark a branch as deleted [1]. This means that when a branch is deleted in GitHub, it is not automatically marked or removed in the lake.refs table during a repository scrape.

To address this, you might consider implementing a mechanism to either mark branches as deleted or remove them from the table when they are deleted in GitHub. This would help in accurately detecting stale branches by excluding those that have been deleted.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot dosubot bot added the severity/p1 This bug affects functionality or significantly affect ux label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/p1 This bug affects functionality or significantly affect ux type/bug This issue is a bug
Projects
None yet
Development

No branches or pull requests

1 participant