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
[FIXED JENKINS-41371][FIXED JENKINS-41948][FIXED JENKINS-41867] Update dependencies to Branch API 2.0.x #145
[FIXED JENKINS-41371][FIXED JENKINS-41948][FIXED JENKINS-41867] Update dependencies to Branch API 2.0.x #145
Conversation
"given_multibranchWithSources_when_branchRemoved_then_branchProjectIsNotBuildable", | ||
SCMEvent.Type.REMOVED, c, "foo", "master", "junkHash")); | ||
r.waitUntilNoActivity(); | ||
assertThat(master.getACL().hasPermission(ACL.SYSTEM, Item.BUILD), is(false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted in jenkinsci/workflow-multibranch-plugin#53 this is pointless. The plugin should rather .setBuildable(false)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The next test does that. This is a proxy for the build action being visible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the build action being visible
It will not be visible if !Job.buildable
, so why not just delete this test case?
Latest build failure seems to be an infra issue:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand the why @Ignore
d tests are the way they are but I'll take your word for it. Will investigate some other time.
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>branch-api</artifactId> | ||
<version>1.5</version> | ||
<version>2.0.5</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires jenkins.version bump to 1.642.3
pom.xml
Outdated
@@ -78,12 +78,12 @@ | |||
<dependency> | |||
<groupId>org.jenkins-ci.plugins</groupId> | |||
<artifactId>cloudbees-folder</artifactId> | |||
<version>5.7</version> | |||
<version>5.17</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependency can be removed instead, since branch-api 2.0.5 dictates this version
Thank you |
@mjdetullio changes made. w.r.t. the ignored tests, basically there is supposed to be a difference between
As it currently stands, I do not think you can fix the buildable one without hacks. The deletable one could perhaps be achieved with The only hack I can think of for buildable is to combine an Another thing I spotted is that you allow for the possibility of the branch being |
If you want to see an example of storing things in a side file see the https://github.com/jenkinsci/branch-api-plugin/blob/master/src/main/java/jenkins/branch/OrganizationFolder.java#L1305 State storage in Org folders. You could achieve something similar. |
Why not simply call |
OK, that would work, as there is already a hook to re-apply the configuration after every attempt by the user to save |
See JENKINS-41371 and JENKINS-41948
I have added some tests of indexing and event driven branch detection, the tests could be expanded to cover the other project types, but in principle these are sufficient to detect the two issues described.
I have added ignored tests for some important gaps with regards to the handling of dead branches
@reviewbybees