The jenkins ItemListener does not fire events when user updates project configurations using the REST API. Events do get fired when user makes changes from the UI though.
Steps to repro:
I am using the python-jenkins library (https://pypi.python.org/pypi/python-jenkins) to update my jobs which does all operations using the jenkins rest API.
1. Create a project
2. Update the project configuration using the REST api. I tried changing the 'concurrentBuild' and 'assignNode' configurations.
3. check the job configuration in the UI to make sure it has been updated.
Note - The job configuration does get updated with the change but no events called from ItemListener. I would expect the ItemListener.onUpdated() event to fire.
This is the XML that was used for updating the job:
<?xml version="1.0" encoding="utf-8"?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<concurrentBuild>false</concurrentBuild>
<assignedNode>centos</assignedNode>
<canRoam>false</canRoam>
<properties/>
<scm class="hudson.scm.NullSCM"/>
<builders>
<hudson.tasks.Shell>
<command>echo my test</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>
[JENKINS-25175] ItemListener event not fired when user updates projects configuration using REST API
Description |
Original:
The jenkins ItemListener does not fire events when user updates project labels. I would expect the onUpdated event to fire. Steps to repro: 1. create a new project 2. select 'Restrict where this project can be run' box and add a label that matches a slave the save the project. 3. now configure the same project and change the label to match a different slave then save the project. Note1 - No events are fired. Note2 - If on step #3, you un-select the option 'Restrict where this project can be run' (thereby removing the label) then save an event does get called. |
New:
The jenkins ItemListener does not fire events when user updates project configurations using the REST API. Events do get fired when user makes changes from the UI though. Steps to repro: I am using the python-jenkins library (https://pypi.python.org/pypi/python-jenkins) to update my jobs which does all operations using the jenkins rest API. 1. Create a project 2. Update the project configuration using the REST api. I tried changing the 'concurrentBuild' and 'assignNode' configurations. Note - No events fired from ItemListener. I would expect the ItemListener.onUpdated() event to fire. This is the XML that was used for updating the job: <?xml version="1.0" encoding="utf-8"?> <project> <actions/> <description></description> <keepDependencies>false</keepDependencies> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <concurrentBuild>false</concurrentBuild> <assignedNode>centos</assignedNode> <canRoam>false</canRoam> <properties/> <scm class="hudson.scm.NullSCM"/> <builders> <hudson.tasks.Shell> <command>echo my test</command> </hudson.tasks.Shell> </builders> <publishers/> <buildWrappers/> </project> |
Description |
Original:
The jenkins ItemListener does not fire events when user updates project configurations using the REST API. Events do get fired when user makes changes from the UI though. Steps to repro: I am using the python-jenkins library (https://pypi.python.org/pypi/python-jenkins) to update my jobs which does all operations using the jenkins rest API. 1. Create a project 2. Update the project configuration using the REST api. I tried changing the 'concurrentBuild' and 'assignNode' configurations. Note - No events fired from ItemListener. I would expect the ItemListener.onUpdated() event to fire. This is the XML that was used for updating the job: <?xml version="1.0" encoding="utf-8"?> <project> <actions/> <description></description> <keepDependencies>false</keepDependencies> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <concurrentBuild>false</concurrentBuild> <assignedNode>centos</assignedNode> <canRoam>false</canRoam> <properties/> <scm class="hudson.scm.NullSCM"/> <builders> <hudson.tasks.Shell> <command>echo my test</command> </hudson.tasks.Shell> </builders> <publishers/> <buildWrappers/> </project> |
New:
The jenkins ItemListener does not fire events when user updates project configurations using the REST API. Events do get fired when user makes changes from the UI though. Steps to repro: I am using the python-jenkins library (https://pypi.python.org/pypi/python-jenkins) to update my jobs which does all operations using the jenkins rest API. 1. Create a project 2. Update the project configuration using the REST api. I tried changing the 'concurrentBuild' and 'assignNode' configurations. 3. check the job configuration in the UI to make sure it has been updated. Note - The job configuration does get updated with the change but no events called from ItemListener. I would expect the ItemListener.onUpdated() event to fire. This is the XML that was used for updating the job: <?xml version="1.0" encoding="utf-8"?> <project> <actions/> <description></description> <keepDependencies>false</keepDependencies> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <concurrentBuild>false</concurrentBuild> <assignedNode>centos</assignedNode> <canRoam>false</canRoam> <properties/> <scm class="hudson.scm.NullSCM"/> <builders> <hudson.tasks.Shell> <command>echo my test</command> </hudson.tasks.Shell> </builders> <publishers/> <buildWrappers/> </project> |
Priority | Original: Major [ 3 ] | New: Minor [ 4 ] |
Workflow | Original: JNJira [ 159084 ] | New: JNJira + In-Review [ 179857 ] |