-
Notifications
You must be signed in to change notification settings - Fork 112
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-64069 Fix plugin / branch-api on 2.264 #165
Conversation
Do you have any pointers on how to test this one? |
Create a multibranch pipeline, choose a scm source, git / github is what I used. It doesn't work for me in this repo. But if I install this incremental into the I haven't managed to figure out why it's broken when running From |
I see what you meant with console errors. The Add buttons also do not work. I'm approving this one but I understand this is an "incremental" right? |
yes more fixes needed, but it's enough to fix at least one issue I've only looked at the multibranch issue so far as that's what was described in JENKINS-64069 |
@@ -33,7 +34,7 @@ THE SOFTWARE. | |||
(<i:formatDate value="${it.timestamp.time}" type="both" dateStyle="medium" timeStyle="medium"/>) | |||
</j:if> | |||
</t:buildCaption> | |||
<table style="margin-top: 1em; margin-left:1em;"> | |||
<fo:blockWrapper> |
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.
do you have any "before/after" screenshot? With this change we're losing the "style" attribute with the margin values
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.
I clicked through everywhere and couldn't see anything that looked off.
I don't have time right now to do that, feel free to add.
This is a fix for preventing creation of a branch source completely...
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.
I will test myself this PR and will be back then
<j:when test="${divBasedFormLayout}"> | ||
<div name="${attrs.name}"> | ||
<d:invokeBody/> | ||
</div> | ||
</j:when> | ||
<j:otherwise> | ||
<table name="${attrs.name}"> | ||
<d:invokeBody/> | ||
</table> | ||
</j:otherwise> |
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.
Will this approach have the same problem noted in jenkinsci/branch-api-plugin#228, or is that problem specific to branch-api
?
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.
possibly, it's the name attribute that isn't getting passed through.
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.
Blocking this PR just to prevent me from merging it by mistake until I can get more context
@timja finally I've been able to spend some time testing this PR yesterday morning and today and this is what I've seen:
Reproduction steps
- Creat a Multibranch pipeline
- Select SCM source: GitHub
- Click Save button
jenkins-core-2.263, branch-api-2.6.0 and cloudbees-folders-2.14
Everything is working as expected and the UI is rendered OK
jenkins-core-2.263, branch-api-2.6.1
Everything seems to be working fine BUT the UI is not rendering well. This bad renderization is happening with cloudbees-folder-2.14 and the hpi generated from this PR.
jenkins-core-2.264 and jenkins-core-2.265, branch-api-2.6.0 and cloudbees-folders-2.14
As @timja stated and expected, the SCM source cannot be renderized after selecting git or GitHub
jenkins-core-2.264 and jenkins-core-2.265, branch-api-2.6.1
I get an error and it's impossible for me to configure the Multibranch pipeline (happening with cloudbees-folder-2.14 and the HPI generated from this PR). It looks like a regression in branch-api
java.lang.IllegalArgumentException: Specified type class org.jenkinsci.plugins.github_branch_source.BranchDiscoveryTrait is not assignable to the expected class jenkins.branch.BranchSource
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:671)
Caused: java.lang.IllegalArgumentException: Failed to instantiate class jenkins.branch.BranchSource from {"stapler-class":["org.jenkinsci.plugins.github_branch_source.GitHubSCMSource","org.jenkinsci.plugins.github_branch_source.BranchDiscoveryTrait","jenkins.branch.BranchSource"],"id":"6f4939fe-ae97-4ec5-8fa5-f27855024080","includeUser":"false","credentialsId":"credId","configuredByUrl":"true","configuredByUrlRadio":"true","repositoryUrl":"https://github.com/jenkinsci/cloudbees-folder-plugin.git","repoOwner":"","repository":"","strategyId":"1","$class":"org.jenkinsci.plugins.github_branch_source.BranchDiscoveryTrait","traits":[{"strategyId":"1","stapler-class":"org.jenkinsci.plugins.github_branch_source.OriginPullRequestDiscoveryTrait","$class":"org.jenkinsci.plugins.github_branch_source.OriginPullRequestDiscoveryTrait"},{"strategyId":"1","":"2","trust":{"stapler-class":["org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustContributors","org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustEveryone","org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustPermission","org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustNobody"],"$class":["org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustContributors","org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustEveryone","org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustPermission","org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustNobody"]},"stapler-class":"org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait","$class":"org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait"},{"stapler-class":"org.jenkinsci.plugins.github_branch_source.BranchDiscoveryTrait","$class":"org.jenkinsci.plugins.github_branch_source.BranchDiscoveryTrait"},{"stapler-class":"org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait","$class":"org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait"},{"stapler-class":"org.jenkinsci.plugins.github_branch_source.OriginPullRequestDiscoveryTrait","$class":"org.jenkinsci.plugins.github_branch_source.OriginPullRequestDiscoveryTrait"},{"stapler-class":"org.jenkinsci.plugins.github_branch_source.TagDiscoveryTrait","$class":"org.jenkinsci.plugins.github_branch_source.TagDiscoveryTrait"},{"stapler-class":"jenkins.scm.impl.trait.RegexSCMHeadFilterTrait","$class":"jenkins.scm.impl.trait.RegexSCMHeadFilterTrait"},{"stapler-class":"jenkins.scm.impl.trait.WildcardSCMHeadFilterTrait","$class":"jenkins.scm.impl.trait.WildcardSCMHeadFilterTrait"},{"stapler-class":"jenkins.plugins.git.traits.CheckoutOptionTrait","$class":"jenkins.plugins.git.traits.CheckoutOptionTrait"},{"stapler-class":"jenkins.plugins.git.traits.CloneOptionTrait","$class":"jenkins.plugins.git.traits.CloneOptionTrait"},{"stapler-class":"jenkins.plugins.git.traits.SubmoduleOptionTrait","$class":"jenkins.plugins.git.traits.SubmoduleOptionTrait"},{"stapler-class":"jenkins.plugins.git.traits.LocalBranchTrait","$class":"jenkins.plugins.git.traits.LocalBranchTrait"},{"stapler-class":"org.jenkinsci.plugins.github_branch_source.SSHCheckoutTrait","$class":"org.jenkinsci.plugins.github_branch_source.SSHCheckoutTrait"},{"stapler-class":"jenkins.plugins.git.traits.CleanAfterCheckoutTrait","$class":"jenkins.plugins.git.traits.CleanAfterCheckoutTrait"},{"stapler-class":"jenkins.plugins.git.traits.CleanBeforeCheckoutTrait","$class":"jenkins.plugins.git.traits.CleanBeforeCheckoutTrait"},{"stapler-class":"jenkins.plugins.git.traits.UserIdentityTrait","$class":"jenkins.plugins.git.traits.UserIdentityTrait"},{"stapler-class":"jenkins.plugins.git.traits.GitLFSPullTrait","$class":"jenkins.plugins.git.traits.GitLFSPullTrait"},{"stapler-class":"jenkins.plugins.git.traits.PruneStaleBranchTrait","$class":"jenkins.plugins.git.traits.PruneStaleBranchTrait"},{"stapler-class":"jenkins.plugins.git.traits.PruneStaleTagTrait","$class":"jenkins.plugins.git.traits.PruneStaleTagTrait"},{"stapler-class":"jenkins.plugins.git.traits.SparseCheckoutPathsTrait","$class":"jenkins.plugins.git.traits.SparseCheckoutPathsTrait"},{"stapler-class":"jenkins.plugins.git.traits.AuthorInChangelogTrait","$class":"jenkins.plugins.git.traits.AuthorInChangelogTrait"},{"stapler-class":"jenkins.plugins.git.traits.WipeWorkspaceTrait","$class":"jenkins.plugins.git.traits.WipeWorkspaceTrait"},{"stapler-class":"jenkins.plugins.git.traits.RemoteNameSCMSourceTrait","$class":"jenkins.plugins.git.traits.RemoteNameSCMSourceTrait"},{"stapler-class":"jenkins.plugins.git.traits.RefSpecsSCMSourceTrait","$class":"jenkins.plugins.git.traits.RefSpecsSCMSourceTrait"}],"":"0","strategy":{"stapler-class":["jenkins.branch.DefaultBranchPropertyStrategy","jenkins.branch.NamedExceptionsBranchPropertyStrategy"],"$class":["jenkins.branch.DefaultBranchPropertyStrategy","jenkins.branch.NamedExceptionsBranchPropertyStrategy"]},"kind":"jenkins.branch.BranchSource"}
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:681)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:474)
at org.kohsuke.stapler.RequestImpl.bindJSONToList(RequestImpl.java:512)
at jenkins.branch.MultiBranchProject.submit(MultiBranchProject.java:896)
at com.cloudbees.hudson.plugins.folder.AbstractFolder.doConfigSubmit(AbstractFolder.java:1363)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.doConfigSubmit(ComputedFolder.java:414)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:536)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
Caused: javax.servlet.ServletException
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:816)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:281)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:694)
at org.kohsuke.stapler.Stapler.service(Stapler.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1633)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:129)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:153)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:51)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:561)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
at java.lang.Thread.run(Thread.java:748)
At this point I will let my co-workers @fqueiruga @batmat @MRamonLeon @alecharp and @rsandell continue reviewing this PR since they have much more context about the tables to div change. I'm more than happy to merge and release the PR once it's OK
Do not hesitate to update the Jenkins core version if that would make fixing simpler. |
I will prepare a separate PR to clean up metadata in this plugin to make it easier to work with. |
@fcojfernandez most of what you found should be fixed by:
|
😂 we have cross dependencies. branch-api tests depends on this PR to pass jenkinsci/branch-api-plugin@0dd53f2 |
How does that make for cross dependencies? |
branch-api plugin can't be released because it's tests fail due to this. (so one needs to go first and disable it's tests and branch-api would be the most sane I think) |
There are no such cross dependencies: cloudbees-folders has no dependency on branch-api.
I could release it, but I cannot test this PR. I think I will move forward and release cloudbees-folders so we can unblock branch-api, but I'd like a branch-api release so after releasing branch-api we can test again this change just in case there is a needed extra change. |
@fcojfernandez you can build |
I meant dependencies in releasing, / tests (including your manual one) passing. |
See JENKINS-64069.
As well as branch-api fixs this plugin needs updates otherwise it breaks branch-api
Proposed changelog entries
Submitter checklist
* Use the
Internal:
prefix if the change has no user-visible impact (API, test frameworks, etc.)@fcojfernandez