Linky blows up on pull requests that don't have an author
Issue #40
resolved
Some pull requests that are returned by the Bitbucket Pull Request Links addon don't have an author because the account that created the pr has since been deleted.
An example is this pr:
The plugin does not handle this scenario well and blows up:
With the following stack trace:
Failed to fetch related Pull Requests from BitbucketCloud(id=700bf14e-64d5-4dda-a595-79811c4e5cee, baseUri=https://staging.bb-inf.net/)
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
at com.atlassian.bitbucket.linky.actions.prlinks.FindCommitRelatedPullRequestsAction.showError(commit-pull-requests.kt:160)
at com.atlassian.bitbucket.linky.actions.prlinks.FindCommitRelatedPullRequestsAction.access$showError(commit-pull-requests.kt:41)
at com.atlassian.bitbucket.linky.actions.prlinks.FindCommitRelatedPullRequestsAction$showPullRequestsForCommit$1$2$1$1$1.doResume(commit-pull-requests.kt:98)
at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:54)
at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:53)
at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resumeWithException(CoroutineImpl.kt:59)
at kotlinx.coroutines.experimental.DispatchTask.run(CoroutineDispatcher.kt:122)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Comments (5)
-
reporter -
staff =) Will fix this.
Just curious, what if a reviewer's account is deleted – will it disappear from reviewers list?
-
reporter Yes, it will just disappear. It's more that we didn't want the deletion of a user account to destroy all the data in pull requests and comments and so we're just setting that foreign key to null.
-
staff - changed status to resolved
Fixed in 4.2
-
staff - removed version
Removing version: 4.1 (automated comment)
- Log in to comment
You weren't the only one not anticipating this btw ;-)
https://bitbucket.org/atlassian/prlinks/pull-requests/18/dont-blow-up-on-prs-whose-author-is-null/diff