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

NaginatorPublisher: Renamed isCheckRegexp to getCheckRegexp. #27

Closed
wants to merge 1 commit into from

Conversation

mjainta
Copy link

@mjainta mjainta commented Feb 5, 2016

I've found a problem since version 1.16

Since 1.16 the regex-Check does not work in combination with checking Matrix-Child-Builds.

As seen in https://wiki.jenkins-ci.org/display/JENKINS/Basic+guide+to+Jelly+usage+in+Jenkins we either need a public checkRegexp field or a getCheckRegexp() function in the NaginatorPublisher class to correctly pass the parameter from the config.jelly

I've provided a fix for that, tho I skipped the tests run using maven in this step. I would appreciate if you could turn this into the next version of the plugin to fix this problem.

@ikedam
Copy link
Member

ikedam commented Feb 5, 2016

Would you tell me more details about the problem? (e.g. how to reproduce the problem and what happens)
As far as I know, regexp for matrix children is introduced since 1.16.
I cannot get what do you mean with "does not work since 1.16".

@jenkinsadmin
Copy link
Member

Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.

@mjainta
Copy link
Author

mjainta commented Feb 6, 2016

Sure, sorry for that short description, gonna try to clear that out.

  1. Create a Matrix-Configuration-Project
    • With a Shell-Task "exit 1"
    • With retry enabled on child-builds and a regex check "thatcannotbe"
  2. Trigger this job
  3. The job will be retriggered, although the regex-check "thatcannotbe" cannot be true

Cause of the Problem: The option checkRegexp will not be passed to the NaginatorPublisher.

Jenkins needs a public checkRegexp field or a getCheckRegexp() function in the class to do that, as we can read here since we use @DataBoundConstructor for the config passing.

@ikedam
Copy link
Member

ikedam commented Feb 7, 2016

Thanks for the details.
The problem doesn't relate to @DataBoundConstructor.
checkRegexp is saved as expected.
I don't think this change fixes the problem.

The problem caused as following ways:

  • "Regular expression to search for" is applied for matrix children only when "Rerun build only for failed parts on the matrix" is checked.
  • When no children matches the regexp, naginator triggers whole the matrix. This looks like naginator ignores the regexp.

I'll file this issue in JIRA.

Would you see followings?

  • Does this change actually fix your problem? (testing locally)
  • What happens when you check "Rerun build only for failed parts on the matrix" and regexp matches only one combination?
    • Regexp like "workspace/axis1/value1"

@mjainta
Copy link
Author

mjainta commented Feb 7, 2016

Thank you for opening the Bug, appreciate it.

Would you see followings?

Does this change actually fix your problem? (testing locally)
What happens when you check "Rerun build only for failed parts on the matrix" and regexp matches only one combination?
Regexp like "workspace/axis1/value1"

I´m today not able to check it again in our system, but:

  • This change actually fixed the problem, so far I can tell
  • Today I dont have a system to try that out today but in my memory "Rerun build only for failed parts on the matrix" works as expected to be

To be honest, the fact that the regexp check is only active on "Rerun build only for failed parts on the matrix" wasnt clear to me from the beginning, so maybe some other fix would fit more. Still my fix works for our situation (letting all child-builds retry when atleast one of them matches the regex)

@mjainta
Copy link
Author

mjainta commented Feb 8, 2016

I just checked it on our system, my change truly didnt fix anything :(
I appreciate that you created the JIRA tickets for this. You can close the pull request if you want to.

What happens when you check "Rerun build only for failed parts on the matrix" and regexp matches only one combination?

Still I tried this one, it correctly reruns only the one axis. In the case the regexp does not match a single axis, all axis get rerun.

@ikedam
Copy link
Member

ikedam commented Feb 8, 2016

Thanks for checking.
Do you have a JIRA account?
I want you watch tickets and review my following fixes if you don't mind.

@mjainta
Copy link
Author

mjainta commented Feb 9, 2016

Hey there,

unfortunately I don´t have a JIRA account.
I wouldn´t mind watching tickets and reviewing fixes, if I would be able to get an account, tho.

@ikedam
Copy link
Member

ikedam commented Feb 9, 2016

OK, I'll mention you when creating pull requests for them.

@ikedam ikedam closed this Feb 9, 2016
@mjainta
Copy link
Author

mjainta commented Feb 9, 2016

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants