[JIRA] (JENKINS-51143) List view section: Job Statuses Filter on disabled doesn't work for pipeline jobs

19 views
Skip to first unread message

wolfgang.kiendl@agfa.com (JIRA)

unread,
May 4, 2018, 12:13:03 PM5/4/18
to jenkinsc...@googlegroups.com
Wolfgang Kiendl updated an issue
 
Jenkins / Bug JENKINS-51143
List view section: Job Statuses Filter on disabled doesn't work for pipeline jobs
Change By: Wolfgang Kiendl
Summary: List view section: Job statuses Statuses Filter on disabled doesn't work for pipeline jobs
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

milkiwaysabe@gmail.com (JIRA)

unread,
Jun 21, 2018, 9:18:00 PM6/21/18
to jenkinsc...@googlegroups.com
jang hyemi started work on Bug JENKINS-51143
 
Change By: jang hyemi
Status: Open In Progress

joerg.schwaerzler@infineon.com (JIRA)

unread,
Jul 5, 2018, 11:14:03 AM7/5/18
to jenkinsc...@googlegroups.com
Joerg Schwaerzler commented on Bug JENKINS-51143
 
Re: List view section: Job Statuses Filter on disabled doesn't work for pipeline jobs

Did you check whether disabled freestyle jobs can be excluded?

For me even excluding freestyle jobs won't work.

This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

wolfgang.kiendl@agfa.com (JIRA)

unread,
Jul 5, 2018, 11:47:01 AM7/5/18
to jenkinsc...@googlegroups.com

Yes, I am using this for freestyle jobs.

I have a List View Section with a "Regular Expression Job Filter" on "Job schedule" with "Include Matched" and a "Job Statuses Filter" with the Disabled checkbox on in the Job Statuses and the "Match Type" is "Exclude Matched". Works fine for freestyle jobs.

For pipeline jobs it fails, because the filtering on Job schedule doesn't work (separately reported issue), so I first have a "Job Type Filter" on Job Type "Pipeline" with "Include Matched" and the again the Job Statuses Filter. Disabled jobs are still shown.

I also have a view of disabled jobs, where I have just a "Job Statuses Filter" with the Disabled checkbox on in the Job Statuses and the "Match Type" is "Include Matched" and I just see the freestyle jobs.

In all views no explicit jobs are selected and "Use regular expression to include jobs into the view" is off. I think combining that checkbox with filters didn't work for me at all.

joerg.schwaerzler@infineon.com (JIRA)

unread,
Jul 5, 2018, 2:03:02 PM7/5/18
to jenkinsc...@googlegroups.com

Thanks for the quick answer.

I checked the code and it's quite obvious why the disabled filter won't work for pipeline jobs. Just got the plugin to compile and test on my machine. I'll now see whether I can fix it - and hopefully do a proper PR.

moritz.knolle@me.com (JIRA)

unread,
Jul 10, 2018, 10:36:02 AM7/10/18
to jenkinsc...@googlegroups.com

moritz.knolle@me.com (JIRA)

unread,
Jul 10, 2018, 10:38:03 AM7/10/18
to jenkinsc...@googlegroups.com

joerg.schwaerzler@infineon.com (JIRA)

unread,
Jul 10, 2018, 11:00:02 AM7/10/18
to jenkinsc...@googlegroups.com

joerg.schwaerzler@infineon.com (JIRA)

unread,
Oct 2, 2018, 3:33:05 AM10/2/18
to jenkinsc...@googlegroups.com

Looks like the pull request from Moritz Knolle came little bit late so it needs a merge first. As Moritz Knolle currently won't have time to do the merge I discussed with him and will take over the PR and do the merge.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

joerg.schwaerzler@infineon.com (JIRA)

unread,
Nov 9, 2018, 5:00:03 AM11/9/18
to jenkinsc...@googlegroups.com

Timothy Bingaman, Sven Schoenung: We're still preparing the PR which initially was created by Moritz Knolle - we're almost done. Wonder whether so else is working on that topic as well. Please let us know.

sven.schoenung@gmail.com (JIRA)

unread,
Nov 9, 2018, 9:51:01 AM11/9/18
to jenkinsc...@googlegroups.com

As chance would have it I actually looked at this issue and the pull request just yesterday.

The actual code fix is pretty straightforward. It's the minimum required Jenkins version that makes me hesitate.

When I fixed the broken build I made sure not to increase the minimum required Jenkins version by too much. It's 1.625.3 right now and it seems fixing this will increase that number to 2.62. There's quite a few versions in between those two where people are using this plugin. Right now it seems like they are not updating the plugin anyway, but it might to too early to tell.

There's always the option of fixing this through reflection without increasing the required Jenkins version (as was done here), but that's complicated, ugly, hard to test, etc...

datenzauberer@gmail.com (JIRA)

unread,
Nov 15, 2018, 11:09:03 AM11/15/18
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Mar 31, 2020, 5:12:04 PM3/31/20
to jenkinsc...@googlegroups.com
Jesse Glick assigned an issue to Jesse Glick
 

#11 has the right fix (replace AbstractProject with ParameterizedJob) but is not mergeable as is. Trying to do some preparatory cleanup in separate PRs.

Change By: Jesse Glick
Assignee: Timothy Bingaman Jesse Glick
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

jglick@cloudbees.com (JIRA)

unread,
Mar 31, 2020, 5:12:07 PM3/31/20
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Mar 31, 2020, 5:12:07 PM3/31/20
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Component/s: pipeline
Component/s: sectioned-view-plugin

joerg.schwaerzler@infineon.com (JIRA)

unread,
Apr 1, 2020, 12:41:03 AM4/1/20
to jenkinsc...@googlegroups.com
Joerg Schwaerzler commented on Bug JENKINS-51143
 
Re: List view section: Job Statuses Filter on disabled doesn't work for pipeline jobs

Jesse Glick Thanks for picking this up
BTW: If I‘m not wrong #12 was a continuation of #11 trying to get it mergeable. Maybe that helps.

jglick@cloudbees.com (JIRA)

unread,
Apr 1, 2020, 11:20:02 AM4/1/20
to jenkinsc...@googlegroups.com

#12 was a continuation of #11

Yes, but actually the three lines of code in #11 which actually fixed this issue were right, and #12 did something different and unnecessarily complex.

jglick@cloudbees.com (JIRA)

unread,
Apr 1, 2020, 1:14:04 PM4/1/20
to jenkinsc...@googlegroups.com

Since I do not much trust the mock-based tests in this plugin, here is my interactive verification:

  • Run 2.222.1, setup wizard to get admin user but skipping plugin installation. From Available, install view-job-filters (from UC: 2.1.1), workflow-basic-steps, workflow-cps, workflow-job.
  • Create an enabled freestyle project, a disabled one, an enabled Pipeline project, and a disabled one. (Otherwise empty—no need for build steps or any builds.)
  • Create a custom list view using the core Status Filter of Disabled jobs only, selecting also Use a regular expression to include jobs into the view with .+; and another with Enabled jobs only. These views correctly show the disabled or enabled freestyle and Pipeline projects, respectively.
  • Create a custom list view using the plugin-provided Job Statuses Filter with Disabled checked and Include Matched - Add jobs that match this filter; and another with Include Unmatched - Add jobs that don't match this filter. Note that the former includes the disabled freestyle project yet omits the disabled Pipeline project, while the latter omits the disabled freestyle project yet includes the disabled Pipeline project, reproducing the bug.
  • Build view-job-filter.hpi from #18, install via Plugin Manager » Advanced, restart. Now running 2.2-SNAPSHOT.
  • See that the plugin-based views now correctly handle the disabled Pipeline project, matching the behavior of the core-based views.

jglick@cloudbees.com (JIRA)

unread,
Apr 1, 2020, 1:15:05 PM4/1/20
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Apr 1, 2020, 1:33:05 PM4/1/20
to jenkinsc...@googlegroups.com
Change By: Jesse Glick
Status: In Review Fixed but Unreleased
Resolution: Fixed
Released As: 2.2

jglick@cloudbees.com (JIRA)

unread,
Apr 1, 2020, 1:50:07 PM4/1/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages