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

spr runtime error with new githubHost (GitHub Enterprise) #402

Open
jonathanloske opened this issue Apr 25, 2024 · 2 comments
Open

spr runtime error with new githubHost (GitHub Enterprise) #402

jonathanloske opened this issue Apr 25, 2024 · 2 comments

Comments

@jonathanloske
Copy link
Contributor

We just moved our repository from one host to another. Subsequently, I updated .spr.yml to point to the new repo. Unfortunately, spr is very unhappy with this:

❯ git spr status           
> git rev-parse --show-toplevel
> github fetch pull requests
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x101059478]

goroutine 1 [running]:
github.com/ejoffe/spr/github/githubclient.(*client).GetInfo(0x140000a2a38, {0x1012444f0?, 0x101561500?}, {0x101244410, 0x140000a2a20})
        /Users/runner/work/spr/spr/github/githubclient/client.go:200 +0x138
github.com/ejoffe/spr/spr.(*stackediff).StatusPullRequests(0x140000acfc0, {0x1012444f0, 0x101561500})
        /Users/runner/work/spr/spr/spr/spr.go:349 +0x74
main.main.func2(0x14000218d80?)
        /Users/runner/work/spr/spr/cmd/spr/main.go:134 +0x28
github.com/urfave/cli/v2.(*Command).Run(0x14000218d80, 0x140000af440)
        /Users/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.8.1/command.go:169 +0x4f8
github.com/urfave/cli/v2.(*App).RunContext(0x14000083860, {0x1012444f0?, 0x101561500}, {0x140000ba000, 0x2, 0x2})
        /Users/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.8.1/app.go:341 +0x85c
github.com/urfave/cli/v2.(*App).Run(...)
        /Users/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.8.1/app.go:247
main.main()
        /Users/runner/work/spr/spr/cmd/spr/main.go:230 +0x1208

This can be reproduced by having set a custom githubHost and then updating it to github.com.

@jonathanloske
Copy link
Contributor Author

I am still having this error. It might also have to do with the instance I'm connecting to. It shouldn't be about the version, though: The old instance we connected to had version GitHub Enterprise Server 3.8.13, while the new one has version GitHub Enterprise Server 3.9.10.

This is the line that is referenced in the error message:

repoID = resp.Repository.Id

The content is repoID = resp.Repository.Id. This is the first time the code accesses information about the repository, maybe it is about that. Please let me know if I can provide any further info. I tried using --detail but it resulted in the same output as above.

@jonathanloske jonathanloske changed the title spr fails after githubHost changed spr runtime error with new githubHost (GitHub Enterprise) May 31, 2024
@jonathanloske
Copy link
Contributor Author

Also of note: This happens even for newly cloned repositories. In the beginning, I thought it was only about repositories in which I had changed githubHost.

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

No branches or pull requests

1 participant