Skip to content

[JENKINS-42194] SCMTrigger should not give a warning when used to suppress post-commit hooks #21890

Closed

Description

@jenkins-infra-bot

The Poll SCM trigger has two purposes:

1. Setting a cadence for polling SCM
2. Declaring that post commit hooks should be ignored

Currently if you want to ignore post commit hooks you are supposed to configure the trigger like so:

Now the issue here is that we are displaying a warning for a desired configuration. This leads users to think that they are doing something wrong.

As a consequence of this, we have had developers of other plugins add their own trigger implementations to control push trigger ignore behaviour (see GitHub plugin for an example)

What we really want is that the field validation should state that empty polling is OK when ignoring triggers:

But retain the field validation when either not ignoring hooks or ignoring hooks but invalid spec


Originally reported by stephenconnolly, imported from: SCMTrigger should not give a warning when used to suppress post-commit hooks
  • assignee: stephenconnolly
  • status: Closed
  • priority: Minor
  • component(s): core
  • label(s): 2.46.2-fixed
  • resolution: Fixed
  • resolved: 2017-04-12T19:58:32+00:00
  • votes: 0
  • watchers: 2
  • imported: 2025-11-24
Raw content of original issue

The Poll SCM trigger has two purposes:

1. Setting a cadence for polling SCM 2. Declaring that post commit hooks should be ignored

Currently if you want to ignore post commit hooks you are supposed to configure the trigger like so:

Now the issue here is that we are displaying a warning for a desired configuration. This leads users to think that they are doing something wrong.

As a consequence of this, we have had developers of other plugins add their own trigger implementations to control push trigger ignore behaviour (see GitHub plugin for an example)

What we really want is that the field validation should state that empty polling is OK when ignoring triggers:

But retain the field validation when either not ignoring hooks or ignoring hooks but invalid spec

4 attachments

Activity

  1. jenkins-infra-bot commented on Feb 20, 2017

    @jenkins-infra-bot
    Author
    • Remote link associated with this issue:

  2. jenkins-infra-bot commented on Feb 20, 2017

    @jenkins-infra-bot
    Author
    stephenconnolly:
    • Original comment link
    • Raw content of original comment:

      Thinking on this more, an empty schedules should not be a warning for Poll SCM ever, we should explain that post commit hooks may contribute or not

    Thinking on this more, an empty schedules should not be a warning for Poll SCM ever, we should explain that post commit hooks may contribute or not

  3. jenkins-infra-bot commented on Feb 26, 2017

    @jenkins-infra-bot
    Author
    scm_issue_link:
    • Original comment link
    • Raw content of original comment:

      Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/triggers/SCMTrigger.java core/src/main/resources/hudson/triggers/Messages.properties core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly http://jenkins-ci.org/commit/jenkins/d0d9216f4fba8337f853aadf9853fb8dcc5cb1cf Log: [FIXED JENKINS-42194] Do not display a warning when ignoring post-commit hooks

    Code changed in jenkins
    User: Stephen Connolly
    Path:
    core/src/main/java/hudson/triggers/SCMTrigger.java
    core/src/main/resources/hudson/triggers/Messages.properties
    core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly
    http://jenkins-ci.org/commit/jenkins/d0d9216f4fba8337f853aadf9853fb8dcc5cb1cf
    Log:
    [FIXED JENKINS-42194] Do not display a warning when ignoring post-commit hooks

  4. jenkins-infra-bot commented on Apr 14, 2017

    @jenkins-infra-bot
    Author
    scm_issue_link:

    Code changed in jenkins
    User: Stephen Connolly
    Path:
    core/src/main/java/hudson/triggers/SCMTrigger.java
    core/src/main/resources/hudson/triggers/Messages.properties
    http://jenkins-ci.org/commit/jenkins/7f42b5bbd31376fa52c1b3aeab15a3c3d3f9f238
    Log:
    JENKINS-42194 Code review reveals valid point, no schedules is not a warning

    (cherry picked from commit 5f5f880)

  5. jenkins-infra-bot commented on Apr 14, 2017

    @jenkins-infra-bot
    Author
    scm_issue_link:
    • Original comment link
    • Raw content of original comment:

      Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/triggers/SCMTrigger.java core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly http://jenkins-ci.org/commit/jenkins/403b1ef6248e4c84fc6a6c19f9906aaf1cb9b461 Log: [FIXED JENKINS-42194] Do not display a warning when ignoring post-commit hooks

      (cherry picked from commit d0d9216f4fba8337f853aadf9853fb8dcc5cb1cf)

    Code changed in jenkins
    User: Stephen Connolly
    Path:
    core/src/main/java/hudson/triggers/SCMTrigger.java
    core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly
    http://jenkins-ci.org/commit/jenkins/403b1ef6248e4c84fc6a6c19f9906aaf1cb9b461
    Log:
    [FIXED JENKINS-42194] Do not display a warning when ignoring post-commit hooks

    (cherry picked from commit d0d9216)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions