github-integration-plugin icon indicating copy to clipboard operation
github-integration-plugin copied to clipboard

triggers settings are ignored

Open adamwong246 opened this issue 8 years ago • 5 comments

We're attempting to configure the plugin to run PRs which are 1) without merge conflict and 2) without certain tags. We'd like the trigger to be run when a PR is created or updated.

Whenever the "GH PR trigger" is run, all PRs are put into the queue, ignoring these settings.

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<flow-definition plugin="[email protected]">
<actions>
<io.jenkins.blueocean.service.embedded.BlueOceanUrlAction plugin="[email protected]">
<blueOceanUrlObject class="io.jenkins.blueocean.service.embedded.BlueOceanUrlObjectImpl">
<mappedUrl>blue/organizations/jenkins/voltron-pr-detect-pipe</mappedUrl>
</blueOceanUrlObject>
</io.jenkins.blueocean.service.embedded.BlueOceanUrlAction>
<org.jenkinsci.plugins.workflow.multibranch.JobPropertyTrackerAction plugin="[email protected]">
<jobPropertyDescriptors>
<string>
org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty
</string>
</jobPropertyDescriptors>
</org.jenkinsci.plugins.workflow.multibranch.JobPropertyTrackerAction>
</actions>
<description/>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.plugins.buildblocker.BuildBlockerProperty plugin="[email protected]">
<useBuildBlocker>false</useBuildBlocker>
<blockLevel>GLOBAL</blockLevel>
<scanQueueFor>DISABLED</scanQueueFor>
<blockingJobs/>
</hudson.plugins.buildblocker.BuildBlockerProperty>
<org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty/>
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]">
<projectUrl>https://github.com/OpenGov/voltron/</projectUrl>
<displayName>voltron</displayName>
</com.coravy.hudson.plugins.github.GithubProjectProperty>
<hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="[email protected]">
<maxConcurrentPerNode>0</maxConcurrentPerNode>
<maxConcurrentTotal>0</maxConcurrentTotal>
<categories class="java.util.concurrent.CopyOnWriteArrayList"/>
<throttleEnabled>false</throttleEnabled>
<throttleOption>project</throttleOption>
<limitOneJobWithMatchingParams>false</limitOneJobWithMatchingParams>
<paramsToUseForLimit/>
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>
<org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
<triggers>
<org.jenkinsci.plugins.github.pullrequest.GitHubPRTrigger plugin="[email protected]">
<spec/>
<triggerMode>HEAVY_HOOKS</triggerMode>
<cancelQueued>true</cancelQueued>
<abortRunning>true</abortRunning>
<skipFirstRun>false</skipFirstRun>
<repoProviders>
<com.github.kostyasha.github.integration.generic.repoprovider.GitHubPluginRepoProvider>
<cacheConnection>true</cacheConnection>
<manageHooks>true</manageHooks>
<repoPermission>ADMIN</repoPermission>
</com.github.kostyasha.github.integration.generic.repoprovider.GitHubPluginRepoProvider>
</repoProviders>
<errorsAction>
<description>GitHub Pull Requests Trigger Errors</description>
<errors class="java.util.Collections$SynchronizedSet" serialization="custom">
<java.util.Collections_-SynchronizedCollection>
<default>
<c class="set"/>
<mutex class="java.util.Collections$SynchronizedSet" reference="../../.."/>
</default>
</java.util.Collections_-SynchronizedCollection>
</errors>
</errorsAction>
<events>
<org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRNonMergeableEvent>
<skip>true</skip>
</org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRNonMergeableEvent>
<org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPROpenEvent/>
<org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRCommitEvent/>
<org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRLabelExistsEvent>
<label>
<labels>
<string>Needs Peer Review</string>
<string>Do Not Merge</string>
<string>Work In Progress</string>
<string>Blocked</string>
</labels>
</label>
<skip>true</skip>
</org.jenkinsci.plugins.github.pullrequest.events.impl.GitHubPRLabelExistsEvent>
</events>
<preStatus>true</preStatus>
</org.jenkinsci.plugins.github.pullrequest.GitHubPRTrigger>
</triggers>
</org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
</properties>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="[email protected]">
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/OpenGov/cloacina.git</url>
<credentialsId>github-og-okta-jenkins</credentialsId>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>master</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions/>
</scm>
<scriptPath>src/org/opengov/pipeline.groovy</scriptPath>
<lightweight>true</lightweight>
</definition>
<triggers/>
<disabled>false</disabled>
</flow-definition>
screen shot 2017-09-25 at 2 39 56 pm
Running GitHub Pull Request trigger check for Sep 25, 2017 9:40:35 PM on GitHubRepositoryName[host=github.com,username=OpenGov,repository=voltron]
GitHub rate limit before check: GHRateLimit{remaining=4841, limit=5000, resetDate=Mon Sep 25 22:05:28 UTC 2017}
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Pull Request Opened: state has changed (PR was opened)
Finished GitHub Pull Request trigger check for GitHubRepositoryName[host=github.com,username=OpenGov,repository=voltron] at Sep 25, 2017 9:40:52 PM. Duration: 16925ms

adamwong246 avatar Sep 25 '17 21:09 adamwong246

according to log it doesn't see the previous state and trigger all PRs. I remember some users reporte d the same problem. Something wrong with workflow? What versions do you use?

KostyaSha avatar Sep 25 '17 23:09 KostyaSha

https://github.com/KostyaSha/github-integration-plugin/issues/203#issuecomment-300902314 Looks the same. Could you read comments?

KostyaSha avatar Sep 25 '17 23:09 KostyaSha

@abayer I looked at workflow-job trigger issues an PRs and i have no idea how it works at all :)

KostyaSha avatar Sep 26 '17 00:09 KostyaSha

i am seeing a similar issue where trigger are ignored, I have kept bare minimum settings.

The comment is exact the same as in PR, poll log does get the github event however it doesn't trigger with message

PR [#5413 Collect build artifacts, disable cleanup] not changed
Finished GitHub Pull Request trigger check for GitHubRepositoryName

job-config-screenshot

Logs:

jenkins-logs.txt polling-log.txt

There is an exception in logs :

Nov 01, 2017 4:27:04 AM SEVERE org.jenkinsci.plugins.github.pullrequest.utils.LoggingTaskListenerWrapper error
Can't end trigger check
java.lang.NullPointerException
	at com.github.kostyasha.github.integration.branch.events.impl.GitHubBranchCommitEvent.check(GitHubBranchCommitEvent.java:118)
	at com.github.kostyasha.github.integration.branch.events.impl.GitHubBranchCommitEvent.check(GitHubBranchCommitEvent.java:85)
	at com.github.kostyasha.github.integration.branch.trigger.check.BranchToCauseConverter.toCause(BranchToCauseConverter.java:90)
	at com.github.kostyasha.github.integration.branch.trigger.check.BranchToCauseConverter.lambda$apply$0(BranchToCauseConverter.java:46)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

studavekar avatar Nov 01 '17 04:11 studavekar

this is resolved for me

adamwong246 avatar Nov 15 '17 00:11 adamwong246