You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling the GetWatchers() function results in a stacktrace [1]
This occurs because the Watchers api no longer returns an AccountID
for each Watcher and now returns a Key and a Username. The Get User
functions also must be updated to support Key (by default) and Username.
Signed-off-by: Prarit Bhargava <[email protected]>
[1] panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6c0d48]
goroutine 1 [running]:
github.com/andygrunwald/go-jira/v2/onpremise.(*IssueService).GetWatchers(0xc000334030, {0x9c5eb0, 0xc000028120}, {0xc000029c18?, 0xc0002136a0?})
/home/prarit/go/pkg/mod/github.com/andygrunwald/go-jira/[email protected]/onpremise/issue.go:1373 +0x208
gitlab.com/prarit/rhjira/cmd.GetWatches(0xc000242100)
/home/prarit/Other/gitlab/rhjira/cmd/lib.go:72 +0x57
gitlab.com/prarit/rhjira/cmd.glob..func1(0xc6e4e0?, {0xc00019a230?, 0x1?, 0x1?})
/home/prarit/Other/gitlab/rhjira/cmd/dump.go:265 +0x5d2
github.com/spf13/cobra.(*Command).execute(0xc6e4e0, {0xc00019a200, 0x1, 0x1})
/home/prarit/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0xc6e200)
/home/prarit/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/prarit/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
gitlab.com/prarit/rhjira/cmd.Execute(0xc000334030?)
/home/prarit/Other/gitlab/rhjira/cmd/main.go:25 +0x3e
main.main()
/home/prarit/Other/gitlab/rhjira/main.go:34 +0x15b
What did you expect to happen?
GetWatchers() succeeds and doesn't panic.
How can we reproduce it (as minimally and precisely as possible)?
I don't know if there is an easy way to reproduce the panic. One thing to try is to simply call GetWatchers() on an issue that has watchers. The returned list will be empty because the Watchers api no longer returns an AccountID for each Watcher and now returns a Key and a Username
Anything else we need to know?
Calling the GetWatchers() function results in a stacktrace [1]
This occurs because the Watchers api no longer returns an AccountID
for each Watcher and now returns a Key and a Username. The Get User
functions also must be updated to support Key (by default) and Username.
Signed-off-by: Prarit Bhargava <[email protected]>
[1] panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6c0d48]
goroutine 1 [running]:
github.com/andygrunwald/go-jira/v2/onpremise.(*IssueService).GetWatchers(0xc000334030, {0x9c5eb0, 0xc000028120}, {0xc000029c18?, 0xc0002136a0?})
/home/prarit/go/pkg/mod/github.com/andygrunwald/go-jira/[email protected]/onpremise/issue.go:1373 +0x208
gitlab.com/prarit/rhjira/cmd.GetWatches(0xc000242100)
/home/prarit/Other/gitlab/rhjira/cmd/lib.go:72 +0x57
gitlab.com/prarit/rhjira/cmd.glob..func1(0xc6e4e0?, {0xc00019a230?, 0x1?, 0x1?})
/home/prarit/Other/gitlab/rhjira/cmd/dump.go:265 +0x5d2
github.com/spf13/cobra.(*Command).execute(0xc6e4e0, {0xc00019a200, 0x1, 0x1})
/home/prarit/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0xc6e200)
/home/prarit/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/prarit/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
gitlab.com/prarit/rhjira/cmd.Execute(0xc000334030?)
/home/prarit/Other/gitlab/rhjira/cmd/main.go:25 +0x3e
main.main()
/home/prarit/Other/gitlab/rhjira/main.go:34 +0x15b
Your Environment
Include as many relevant details about the environment you experienced the problem in
go-jira version (git tag or sha): this is actually seen with 1.16.0 but also can be reproduced with 2.0.0 (top-of-tree commit ID 2e11dff)
Go version (go version): go1.19.9
Jira type (cloud or on-premise): on-premise
Jira version / Api version: 2
The text was updated successfully, but these errors were encountered:
What happened?
What did you expect to happen?
GetWatchers() succeeds and doesn't panic.
How can we reproduce it (as minimally and precisely as possible)?
I don't know if there is an easy way to reproduce the panic. One thing to try is to simply call GetWatchers() on an issue that has watchers. The returned list will be empty because the Watchers api no longer returns an AccountID for each Watcher and now returns a Key and a Username
Anything else we need to know?
Your Environment
Include as many relevant details about the environment you experienced the problem in
go-jira version (git tag or sha): this is actually seen with 1.16.0 but also can be reproduced with 2.0.0 (top-of-tree commit ID 2e11dff)
Go version (
go version
): go1.19.9Jira type (cloud or on-premise): on-premise
Jira version / Api version: 2
The text was updated successfully, but these errors were encountered: