Matrix plugin does not enumerate Labels and Nodes

Jenkins 2.387.2
Matrix Authorization Strategy Plugin 3.1.7
Matrix Project Plugin 789.v57a_725b_63c79

This week we have found that the Configuration screen for Matrix jobs no longer enumerates Labels and Nodes in Configure > Configuration Matrix > Agents:

This appears to be new behavior this week. I tried creating a new Matrix job but the behavior is the same.

Any suggestions how to fix this please?

A follow-up question on this. On the Jenkins controller where I see the problem, if I create a new Multi-configuration project, I am offered 3 options when adding an axis:

Matrix_A

But on another, newer Jenkins controller, I see only one option:

Matrix_B

It’s a long time since I set-up the matrix jobs. Would the ‘Agents’, ‘Label expression’ options be something I would have set-up or are they automatically offered by the plugin?

If the latter, why are they not offered on the newer controller?

I suspect that you’re seeing a bug that is somehow related to “Unable to reorder elements in jobs” and possibly to “Cannot select secret” . The change in 2.402 seems to be the cause.

Switch to 2.401 while the maintainers investigate alternatives. Would also be good to confirm that [JENKINS-71089] Fix `hasHeader` attribute for `f:hetero-list` by janfaracik · Pull Request #7853 · jenkinsci/jenkins · GitHub is the cause if you’re able to build Jenkins locally with that pull request reverted.

I suspect that you are missing one or more plugins (possibly node label parameter plugin?) on the new controller that are installed on the old controller. When I create a matrix project with Jenkins 2.402, it shows the three items in the dropdown that you see on your other controller.

I am unable to duplicate the problem that you’re seeing on my fresh install of Jenkins 2.402. When I open the configuration matrix I see the expected dropdown for nodes and labels with both Firefox 112 and most recent Google Chrome.

configuration-matrix

Are you running Firefox ESR or some other browser?

Hi Mark, thanks for your help.

Regarding the second controller, which doesn’t offer labels or nodes, I think I have missed the obvious - this controller doesn’t have any agents, so I guess it is reasonable that none are offered.

Regarding the ‘production’ controllers that my first question was about: I am using Edge and Chrome, both browers do not show the Label and Node trees.

It seems, from your latest reply, that the Jenkins version is not the reason. But, anyway, I am using the LTS, which is much earlier.

I have another unresolved thread that questions why the snippet generator is not working for me for some plugins.

Snippet Generator not working - Using Jenkins - Jenkins

Perhaps the two problems are connected?

@MarkEWaite I wonder if you can help me further with this issue please?

My problem remains that the Configuration screen for Matrix jobs no longer enumerates Labels and Nodes in Configure > Configuration Matrix > Agents:

We are running 2.401.1 LTS, so the problem is before 2.402.

Plugins are up-to-date and we have:

Matrix Project Plugin
Matrix sorter Plugin
Node and label parameter Plugin

installed.

The problem appears in Chrome and Edge.

Do you have any suggestions for how to fix this please?

In a strange twist, I can now duplicate something very similar to the problem that you are seeing. I’m using Jenkins 2.401.1 with recent releases of all installed plugins as listed in my plugins.txt file. When I click the “Agents” in the “Axis” drop down, there is no response. In the JavaScript console of the Chrome browser I see the following error:

I have no explanation (yet) that would justify why I could not duplicate the problem before and now I can duplicate it. If I find the key difference between my previously passing case and the current failing case, I will let you know. I’ll likely create an issue once I understand the root cause of the problem that I’m seeing.

1 Like

@MarkEWaite Thanks for investigating this. Please let me know if/when you create an issue.

@MarkEWaite Hi Mark, I just wondered whether you have managed to look into this any further?

Best regards, David

No, I haven’t investigated any further. I have suspicions that there is a difference in the file system that is some remnant of the install and upgrade process on that machine.

@MarkEWaite Hi Mark, could you please have another look at this? We use matrix jobs a lot and they are basically broken as the UI isn’t working.

Alternatively, should we be looking at implementing matrix jobs in pipeline? Is that straightforward? One of our engineers has tried it and he says it’s a bit of a nightmare. And, of course, it’s not as user-friendly as the UI.

Sorry, I can’t spend more time on it now.

I very much prefer Pipeline as a replacement for matrix projects. Pipelines allow those who submit changes to the source code to also change the job definition.

Ok, thanks.

Are the agents/labels set in the pipeline rather than in the GUI?

Pipeline jobs define the agent where they should run by defining the label that is required for one or more Pipeline steps.

Labels are assigned to agents from the Jenkins agent administration page or by the cloud plugin that manages the creation and deletion of the agent or by plugins like the platform labeler plugin or the implied labels plugin.

You might consider the following video as an introduction:

Thanks Mark, I will watch the video.

Can I finish with this question…

This blog post:

Welcome to the Matrix (jenkins.io)

states:

Our requirement is different. Instead of running all combinations, we want each value of one axis to run on just one of the agents defined by the label axis. It’s like a simple scheduler. We have a pool of agents and run each ‘value’ once on one machine from that pool. This was possible in the freestyle matrix job. Is it possible with pipeline?

As far as I know, yes, that can be done with Pipeline

1 Like