Skip to content

deleting branch after squashing PR not working anymore since vscode 1.98.0 #6699

Closed

Description

After squashing a PR in numpy/numtype via the web interface, then refreshing in VSCode, I press the "delete branch" button, and see the following logs:

2025-03-07 14:54:29.773 [error] [GitHubRepository+0] Unable to compare commits between numpy:main and numpy:faster-pyright: HttpError: Not Found

This is happening since I upgraded VSCode to 1.98.0. I tried both the release- and pre-release versions of the extension.

  • Extension version: 0.107.2025030604
  • VSCode Version: 1.98.0
  • OS: Ubuntu 22.04 (PopOS)
  • Repository Clone Configuration (single repository/fork of an upstream repository):
  • Github Product (Github.com/Github Enterprise version x.x.x):

Steps to Reproduce:

  1. Squash (or merge) a PR in numpy/numtype in the browser
  2. refresh the PR in VSCode
  3. attempt to delete the branch in VSCode

Activity

  1. changed the title [-]branch deletion after PR not working anymore since vscode 1.98.0[/-] [+]deleting branch after squashing PR not working anymore since vscode 1.98.0[/+] on Mar 7, 2025
  2. alexr00 commented on Mar 20, 2025

    @alexr00
    Member

    Joren Hammudoglu (@jorenham) Do you still see this? I squash then delete on a regular basis and haven't seen this issue.

  3. jorenham commented on Mar 20, 2025

    @jorenham
    Author

    @jorenham Do you still see this? I squash then delete on a regular basis and haven't seen this issue.

    I believe it does, but to be sure, I'll try it right now with numpy/numtype#345.

  4. jorenham commented on Mar 20, 2025

    @jorenham
    Author

    after squashing through the github web interface:

    Image

    after squashing, and hitting "refresh" in vscode:

    Image

    so I pressed "Delete branch...":

    Image

    I clicked on "Ok", but the branch still exists locally and is still checked out:

    Image

    but the "Delete branch..." button is now disabled:

    Image

    Git branches view:

    Image


    relevant output logs:

    2025-03-20 18:00:22.681 [info] [FolderRepositoryManager+0] Found GitHub pr repo for pr #345: yes
    2025-03-20 18:03:39.492 [info] [FolderRepositoryManager+0] Found GitHub repo for pr #345: yes
    2025-03-20 18:03:39.572 [info] [FolderRepositoryManager+0] Found GitHub remote for folder /home/joren/Workspace/numtype
    2025-03-20 18:03:39.572 [info] [FolderRepositoryManager+0] Using in-memory cached assignable users.
    2025-03-20 18:03:39.833 [error] [GitHubRepository+0] Unable to compare commits between numpy:main and numpy:better-floating-ops: HttpError: Not Found
    2025-03-20 18:03:39.889 [info] [PullRequestTree] Review threads have changed, refreshing Files node
    2025-03-20 18:03:39.889 [info] [PullRequestTree] Review threads have changed, refreshing Commits node
    2025-03-20 18:03:40.143 [info] [FolderRepositoryManager+0] Found GitHub pr repo for pr #345: yes
    2025-03-20 18:03:40.454 [info] [FolderRepositoryManager+0] Found GitHub repo for pr #345: yes
    2025-03-20 18:03:40.761 [error] [GitHubRepository+0] Unable to compare commits between numpy:main and numpy:better-floating-ops: HttpError: Not Found
    2025-03-20 18:03:40.794 [info] [FolderRepositoryManager+0] Found GitHub remote for folder /home/joren/Workspace/numtype
    2025-03-20 18:03:40.794 [info] [FolderRepositoryManager+0] Using in-memory cached assignable users.
    2025-03-20 18:03:40.804 [info] [PullRequestTree] Review threads have changed, refreshing Files node
    2025-03-20 18:03:40.804 [info] [PullRequestTree] Review threads have changed, refreshing Commits node
    2025-03-20 18:03:41.032 [info] [FolderRepositoryManager+0] Found GitHub pr repo for pr #345: yes
    
  5. jorenham commented on Mar 20, 2025

    @jorenham
    Author

    I squash then delete on a regular basis and haven't seen this issue.

    Is it a personal repo or an organization repo (like in my case)?

  6. alexr00 commented on Mar 24, 2025

    @alexr00
    Member

    Organization repo. Like this repo or microsoft/vscode.

  7. jorenham commented on Mar 24, 2025

    @jorenham
    Author

    Organization repo. Like this repo or microsoft/vscode.

    Hmm, then there must be something else that differs 🤔

  8. alexr00 commented on Apr 7, 2025

    @alexr00
    Member

    Joren Hammudoglu (@jorenham), next time you see this, can you share the output from "Git"?

  9. removed this from the April 2025 milestone on Apr 7, 2025
  10. jorenham commented on Apr 7, 2025

    @jorenham
    Author

    I just tried again with python/typeshed#13760

    2025-04-07 16:02:57.219 [info] > git fetch --prune [1373ms]
    2025-04-07 16:02:57.219 [info] From github.com:jorenham/typeshed
     - [deleted]             (none)     -> origin/ctypes.py_object-generic-default
    2025-04-07 16:02:57.242 [info] > git config --get commit.template [2ms]
    2025-04-07 16:02:57.261 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/ctypes.py_object-generic-default refs/remotes/ctypes.py_object-generic-default [1ms]
    2025-04-07 16:02:57.300 [info] > git status -z -uall --ignore-submodules [18ms]
    2025-04-07 16:02:57.300 [info] > git for-each-ref --sort -committerdate --format %(refname)%00%(objectname)%00%(*objectname) [2ms]
    2025-04-07 16:02:57.319 [info] > git config --get --local branch.ctypes.py_object-generic-default.github-pr-owner-number [1ms]
    2025-04-07 16:02:58.421 [info] > git ls-files --stage -- stdlib/ctypes/__init__.pyi [2ms]
    2025-04-07 16:02:58.437 [info] > git cat-file -s a7e9c1ce068ce752e49b572a833cb48a901bcdf9 [1ms]
    2025-04-07 16:02:58.454 [info] > git show --textconv :stdlib/ctypes/__init__.pyi [1ms]
    2025-04-07 16:03:06.884 [info] > git config --local -l [1ms]
    2025-04-07 16:03:08.766 [info] > git branch -D ctypes.py_object-generic-default [1ms]
    2025-04-07 16:03:08.767 [info] error: Cannot delete branch 'ctypes.py_object-generic-default' checked out at '/home/joren/Workspace/typeshed'
    2025-04-07 16:03:08.783 [info] > git config --get commit.template [2ms]
    2025-04-07 16:03:08.796 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/ctypes.py_object-generic-default refs/remotes/ctypes.py_object-generic-default [2ms]
    2025-04-07 16:03:08.820 [info] > git status -z -uall --ignore-submodules [11ms]
    2025-04-07 16:03:08.820 [info] > git for-each-ref --sort -committerdate --format %(refname)%00%(objectname)%00%(*objectname) [1ms]
    2025-04-07 16:03:58.232 [info] > git diff --name-status -z --diff-filter=ADMR @{upstream} [1ms]
    2025-04-07 16:03:58.232 [info] fatal: ambiguous argument '@{upstream}': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
    2025-04-07 16:03:59.677 [info] > git fetch --prune [1357ms]
    2025-04-07 16:03:59.698 [info] > git config --get commit.template [2ms]
    2025-04-07 16:03:59.720 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/ctypes.py_object-generic-default refs/remotes/ctypes.py_object-generic-default [2ms]
    2025-04-07 16:03:59.759 [info] > git status -z -uall --ignore-submodules [19ms]
    2025-04-07 16:03:59.759 [info] > git for-each-ref --sort -committerdate --format %(refname)%00%(objectname)%00%(*objectname) [1ms]
    
  11. jorenham commented on Apr 7, 2025

    @jorenham
    Author

    and again with python/typeshed#13777, while paying more attention to limit the logs to what's relevant:

    2025-04-07 16:07:28.832 [info] > git config --local -l [1ms]
    2025-04-07 16:07:30.235 [info] > git branch -D ctypes._._type_ [1ms]
    2025-04-07 16:07:30.235 [info] error: Cannot delete branch 'ctypes._._type_' checked out at '/home/joren/Workspace/typeshed'
    2025-04-07 16:07:30.248 [info] > git config --get commit.template [1ms]
    2025-04-07 16:07:30.262 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/ctypes._._type_ refs/remotes/ctypes._._type_ [1ms]
    2025-04-07 16:07:30.287 [info] > git status -z -uall --ignore-submodules [13ms]
    2025-04-07 16:07:30.287 [info] > git for-each-ref --sort -committerdate --format %(refname)%00%(objectname)%00%(*objectname) [1ms]
    
  12. alexr00 commented on Apr 7, 2025

    @alexr00
    Member

    Based on the screenshots, you don't have the PR branch currently checked out, but the logs say you do have it checked out? Do you have the PR branch currently checked out? When this happens, what is the output of git status?

  13. 2 remaining items

  14. added
    bugIssue identified by VS Code Team member as probable bug
    and removed
    info-neededIssue requires more information from poster
    on Apr 7, 2025
  15. added this to the April 2025 milestone on Apr 7, 2025
  16. added a commit that references this issue on Apr 25, 2025
    5c3471a
  17. added a commit that references this issue on Apr 25, 2025
    8e00d98
  18. TylerLeonhardt commented on May 1, 2025

    @TylerLeonhardt
    Member

    Joren Hammudoglu (@jorenham) can you verify this is fixed in VS Code Insiders and the Pre-release version of the GitHub Pull Request extension?

  19. jorenham commented on May 1, 2025

    @jorenham
    Author

    @jorenham can you verify this is fixed in VS Code Insiders and the Pre-release version of the GitHub Pull Request extension?

    Working on it; but CI seems to be having trouble getting out of bed today
    numpy/numtype#536

  20. TylerLeonhardt commented on May 1, 2025

    @TylerLeonhardt
    Member

    but CI seems to be having trouble getting out of bed today

    relatable

  21. jorenham commented on May 1, 2025

    @jorenham
    Author

    With VSCode insiders and the pre-release extension, it seems to work now. But with the stable VSCode and the pre-release ext, it's still the same problem

  22. TylerLeonhardt commented on May 1, 2025

    @TylerLeonhardt
    Member

    Yes that's because the latest version of the pre-release ext is not compatible with the current Stable version of VS Code. When the next Stable VS Code is released (next week), there will also be a GH PR extension release which will work there. Thanks for verifying!

  23. jorenham commented on May 1, 2025

    @jorenham
    Author

    Thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

author-verification-requestedIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions