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

Fixing JENKINS-48867 - Prevent multi branch projects from orphaning items if repository is unavailable #144

Closed
wants to merge 1 commit into from

Conversation

hrmohr
Copy link

@hrmohr hrmohr commented Apr 22, 2020

Attempt at fixing JENKINS-48867 using the suggestion by Dave E

I don't know if this will break expected behaviour in other use cases but it seems to fix this issue.

@jglick jglick added the bug label Oct 13, 2020
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Other than the exception type, looks right. Not sure if it is feasible to write a test for this.

@@ -195,22 +195,19 @@ public void setCredentialsId(@CheckForNull String credentialsId) {
.newRequest(this, listener) ) {
MercurialInstallation inst = MercurialSCM.findInstallation(request.installation());
if (inst == null) {
listener.error("No configured Mercurial installation");
return;
throw new IOException("No configured Mercurial installation");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
throw new IOException("No configured Mercurial installation");
throw new AbortException("No configured Mercurial installation");

and similarly elsewhere.

@jglick
Copy link
Member

jglick commented Oct 13, 2020

Could probably be reproduced in MercurialSCMSource2Test by setting up a working project, verifying branch indexing works, deleting the origin repo, reindexing, verifying that the reindexing reported an error, and verifying that the branch projects still exist.

@jglick
Copy link
Member

jglick commented Oct 14, 2020

See #149.

@jglick jglick closed this Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants