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

[JENKINS-67175] More gracefully handle empty bundlesToDownload #465

Merged
merged 1 commit into from May 10, 2023

Conversation

jglick
Copy link
Member

@jglick jglick commented May 9, 2023

In a support bundle (ironically enough) I noticed a stack trace

java.util.NoSuchElementException
	at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1513)
	at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1534)
	at com.cloudbees.jenkins.support.SupportAction.doDownloadBundles(SupportAction.java:227)

which looks like it could come from an attempt to download no bundles. Should be handled more clearly.

@jglick jglick requested a review from a team as a code owner May 9, 2023 14:18
@jglick jglick added the bug label May 9, 2023
@jglick
Copy link
Member Author

jglick commented May 9, 2023

Tried to reproduce actually, but without any existing bundles, the button is offered and if you click it you get a 400 browser error, which is not too friendly either

if (!json.has("bundles")) {
rsp.sendError(HttpServletResponse.SC_BAD_REQUEST);
return;
}

@Dohbedoh Dohbedoh merged commit 9ddb028 into jenkinsci:master May 10, 2023
16 checks passed
@Dohbedoh Dohbedoh changed the title More gracefully handle empty bundlesToDownload [JENKINS-67175] More gracefully handle empty bundlesToDownload May 10, 2023
@jglick jglick deleted the no-bundles branch May 10, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants