Skip to content
Permalink
Browse files
1019: IssueNotifier fails if there are extra branches in a repo
Reviewed-by: kcr, ehelin
  • Loading branch information
erikj79 committed May 7, 2021
1 parent 58e1d72 commit 3ec08934850a8c0f5616a0f7d2ba2f6eb5d05db0
@@ -352,13 +352,16 @@ public void onNewOpenJDKTagCommits(HostedRepository repository, Repository local
}
}
if (requestedVersion == null) {
throw new RuntimeException("Failed to determine requested fixVersion for " + issue.id());
log.info("Cannot update \"Resolved In Build\" for issue: " + issue.id() + ", branch: "
+ tagBranch + " - no fixVersion configured");
continue;
}
var fixVersion = JdkVersion.parse(requestedVersion).orElseThrow();
var existing = Backports.findIssue(issue, fixVersion);
if (existing.isEmpty()) {
log.severe("Cannot find a properly resolved issue for: " + issue.id() + " - will not update resolved in build");
return;
log.info("Cannot update \"Resolved in Build\" for issue: " + issue.id() + ", branch: "
+ tagBranch + " - no suitable backport found");
continue;
} else {
issue = existing.get();
}
@@ -691,6 +691,8 @@ void testIssueBuildAfterTagMultipleBranches(TestInfo testInfo) throws IOExceptio
var editHash = CheckableRepository.appendAndCommit(localRepo, "Another line", issue.id() + ": Fix that issue", "Duke", authorEmailAddress);
localRepo.push(editHash, repo.url(), "master");
localRepo.push(editHash, repo.url(), "other");
// Add an extra branch that is not configured with any fixVersion
localRepo.push(editHash, repo.url(), "extra");
TestBotRunner.runPeriodicItems(notifyBot);

// The changeset should be reflected in a comment in the issue and in a new backport

1 comment on commit 3ec0893

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 3ec0893 May 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.