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

[FIX JENKINS-26977] Use project-specific check URL #2693

Merged
merged 1 commit into from
Jan 30, 2017

Conversation

daniel-beck
Copy link
Member

Not sure whether this would lead to weird interactions though.

@jenkinsci/code-reviewers and especially @jglick PTAL

@daniel-beck daniel-beck added the needs-more-reviews Complex change, which would benefit from more eyes label Jan 2, 2017
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -25,7 +25,7 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<f:entry title="${%Schedule}" help="/descriptor/hudson.triggers.TimerTrigger/help/spec">
<f:textarea field="scmpoll_spec" checkUrl="'${rootURL}/trigger/TimerTrigger/check?value='+encodeURIComponent(this.value)"/>
<f:textarea field="scmpoll_spec" checkUrl="'descriptorByName/hudson.triggers.TimerTrigger/checkSpec?value='+encodeURIComponent(this.value)"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this not need to be /descriptorByName or use the ${rootUrl}/descriptorByName

For jobs in folders - I would expect this to be currently be an incrrect URL leading to a 404.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtnord This calls http://javadoc.jenkins-ci.org/hudson/model/AbstractItem.html#getDescriptorByName%28java.lang.String%29 and it needs to for the H pattern in cron expressions, which are project specific and use AncestorInPath:

public FormValidation doCheckSpec(@QueryParameter String value, @AncestorInPath Item item) {

Otherwise, no way to resolve this issue of incorrect predictions in the 'success' case.

@daniel-beck daniel-beck merged commit a6ae9c9 into jenkinsci:master Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-reviews Complex change, which would benefit from more eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants