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

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

Open
jorenham opened this issue Mar 7, 2025 · 12 comments
Open
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@jorenham
Copy link

jorenham commented Mar 7, 2025

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
@jorenham jorenham 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 Mar 7, 2025
@alexr00
Copy link
Member

alexr00 commented Mar 20, 2025

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

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Mar 20, 2025
@jorenham
Copy link
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.

@jorenham
Copy link
Author

jorenham commented Mar 20, 2025

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

@jorenham
Copy link
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)?

@alexr00
Copy link
Member

alexr00 commented Mar 24, 2025

Organization repo. Like this repo or microsoft/vscode.

@alexr00 alexr00 self-assigned this Mar 24, 2025
@alexr00 alexr00 added this to the April 2025 milestone Mar 24, 2025
@jorenham
Copy link
Author

Organization repo. Like this repo or microsoft/vscode.

Hmm, then there must be something else that differs 🤔

@alexr00
Copy link
Member

alexr00 commented Apr 7, 2025

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

@alexr00 alexr00 removed this from the April 2025 milestone Apr 7, 2025
@jorenham
Copy link
Author

jorenham commented Apr 7, 2025

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]

@jorenham
Copy link
Author

jorenham commented Apr 7, 2025

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]

@alexr00
Copy link
Member

alexr00 commented Apr 7, 2025

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?

@jorenham
Copy link
Author

jorenham commented Apr 7, 2025

❯ git status
On branch ctypes._._type_
Your branch is based on 'origin/ctypes._._type_', but the upstream is gone.
  (use "git branch --unset-upstream" to fixup)

nothing to commit, working tree clean

@alexr00
Copy link
Member

alexr00 commented Apr 7, 2025

I think I see what's going on, thanks!

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Apr 7, 2025
@alexr00 alexr00 added this to the April 2025 milestone Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants