-
Bug
-
Resolution: Fixed
-
Major
Actions created from a TransientActionFactory are persisted in a Run when they should never be persisted.
If you have a TAF that creates an action for any ModelItem then on {{FreeStyleBuild}}s you will end up with 3 duplicate Actions displayed (and 2 will be persisted in the build.xml)
One is created for the hudson.model.Queue$WaitingItem one for the hudson.model.Queue$BuildableItem and the last one for the actual build (which is the one that is not persisted).
<?xml version='1.1' encoding='UTF-8'?> <build> <actions> <hudson.model.CauseAction> <causeBag class="linked-hash-map"> <entry> <hudson.model.Cause_-UserIdCause> <userId>james</userId> </hudson.model.Cause_-UserIdCause> <int>1</int> </entry> </causeBag> </hudson.model.CauseAction> <com.myco.myplugin.MyAction> <target>hudson.model.Queue$WaitingItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.myco.myplugin.MyAction> <com.myco.myplugin.MyAction> <target>hudson.model.Queue$BuildableItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.myco.myplugin.MyAction> <jenkins.metrics.impl.TimeInQueueAction> <queuingDurationMillis>9</queuingDurationMillis> </jenkins.metrics.impl.TimeInQueueAction> </actions> <queueId>5</queueId> <timestamp>1527599156095</timestamp> <startTime>1527599156104</startTime> <result>SUCCESS</result> <duration>3225</duration> <charset>windows-1252</charset> <keepLog>false</keepLog> <builtOn></builtOn> <workspace>C:\workarea\yplugin\work\workspace\free</workspace> <hudsonVersion>2.107.3</hudsonVersion> <scm class="hudson.scm.NullChangeLogParser"/> <culprits class="com.google.common.collect.EmptyImmutableSortedSet"/> </build>
- relates to
-
JENKINS-44624 Extending BlueOceanUrlAction + BlueOceanUrlActionFactory leads to duplicate Blue Ocean link
-
- Closed
-
-
JENKINS-45476 Multiple Blue Ocean links are displayed
-
- Closed
-
-
JENKINS-44964 NPE in logs when browsing Maven projects
-
- Closed
-
-
JENKINS-51627 remove "Try Blue" action hacks
-
- Closed
-
- links to
[JENKINS-51584] actions from TransientActionFactories are saved in Builds.
Description |
Original:
{{Actions}} created from a {{TransientActionFactory}} are persisted in a {{Run}} when they should never be persisted. If you have a {{TAF}} that creates an action for any {{ModelItem}} then on {{FreeStyleBuild}}s you will end up with 3 duplicate Actions displayed (and 2 will be persisted in the build.xml) One is created for the {{hudson.model.Queue$WaitingItem}} one for the {{hudson.model.Queue$BuildableItem}} and the last one for the actual build (which is the one that is not persisted). {code:java} <?xml version='1.1' encoding='UTF-8'?> <build> <actions> <hudson.model.CauseAction> <causeBag class="linked-hash-map"> <entry> <hudson.model.Cause_-UserIdCause> <userId>james</userId> </hudson.model.Cause_-UserIdCause> <int>1</int> </entry> </causeBag> </hudson.model.CauseAction> <com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction plugin="bluesteel-cjoc@1.2.7-SNAPSHOT"> <target>hudson.model.Queue$WaitingItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction> <com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction plugin="bluesteel-cjoc@1.2.7-SNAPSHOT"> <target>hudson.model.Queue$BuildableItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction> <jenkins.metrics.impl.TimeInQueueAction plugin="metrics@3.1.2.12"> <queuingDurationMillis>9</queuingDurationMillis> </jenkins.metrics.impl.TimeInQueueAction> </actions> <queueId>5</queueId> <timestamp>1527599156095</timestamp> <startTime>1527599156104</startTime> <result>SUCCESS</result> <duration>3225</duration> <charset>windows-1252</charset> <keepLog>false</keepLog> <builtOn></builtOn> <workspace>C:\workarea\source\github\cloudbees\bluesteel\bluesteel-cjoc\work\workspace\free</workspace> <hudsonVersion>2.107.3-cb-1</hudsonVersion> <scm class="hudson.scm.NullChangeLogParser"/> <culprits class="com.google.common.collect.EmptyImmutableSortedSet"/> </build> {code} |
New:
{{Actions}} created from a {{TransientActionFactory}} are persisted in a {{Run}} when they should never be persisted. If you have a {{TAF}} that creates an action for any {{ModelItem}} then on {{FreeStyleBuild}}s you will end up with 3 duplicate Actions displayed (and 2 will be persisted in the build.xml) One is created for the {{hudson.model.Queue$WaitingItem}} one for the {{hudson.model.Queue$BuildableItem}} and the last one for the actual build (which is the one that is not persisted). {code:title=build.xml|xml} <?xml version='1.1' encoding='UTF-8'?> <build> <actions> <hudson.model.CauseAction> <causeBag class="linked-hash-map"> <entry> <hudson.model.Cause_-UserIdCause> <userId>james</userId> </hudson.model.Cause_-UserIdCause> <int>1</int> </entry> </causeBag> </hudson.model.CauseAction> <com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction plugin="bluesteel-cjoc@1.2.7-SNAPSHOT"> <target>hudson.model.Queue$WaitingItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction> <com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction plugin="bluesteel-cjoc@1.2.7-SNAPSHOT"> <target>hudson.model.Queue$BuildableItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction> <jenkins.metrics.impl.TimeInQueueAction plugin="metrics@3.1.2.12"> <queuingDurationMillis>9</queuingDurationMillis> </jenkins.metrics.impl.TimeInQueueAction> </actions> <queueId>5</queueId> <timestamp>1527599156095</timestamp> <startTime>1527599156104</startTime> <result>SUCCESS</result> <duration>3225</duration> <charset>windows-1252</charset> <keepLog>false</keepLog> <builtOn></builtOn> <workspace>C:\workarea\source\github\cloudbees\bluesteel\bluesteel-cjoc\work\workspace\free</workspace> <hudsonVersion>2.107.3-cb-1</hudsonVersion> <scm class="hudson.scm.NullChangeLogParser"/> <culprits class="com.google.common.collect.EmptyImmutableSortedSet"/> </build> {code} |
Description |
Original:
{{Actions}} created from a {{TransientActionFactory}} are persisted in a {{Run}} when they should never be persisted. If you have a {{TAF}} that creates an action for any {{ModelItem}} then on {{FreeStyleBuild}}s you will end up with 3 duplicate Actions displayed (and 2 will be persisted in the build.xml) One is created for the {{hudson.model.Queue$WaitingItem}} one for the {{hudson.model.Queue$BuildableItem}} and the last one for the actual build (which is the one that is not persisted). {code:title=build.xml|xml} <?xml version='1.1' encoding='UTF-8'?> <build> <actions> <hudson.model.CauseAction> <causeBag class="linked-hash-map"> <entry> <hudson.model.Cause_-UserIdCause> <userId>james</userId> </hudson.model.Cause_-UserIdCause> <int>1</int> </entry> </causeBag> </hudson.model.CauseAction> <com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction plugin="bluesteel-cjoc@1.2.7-SNAPSHOT"> <target>hudson.model.Queue$WaitingItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction> <com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction plugin="bluesteel-cjoc@1.2.7-SNAPSHOT"> <target>hudson.model.Queue$BuildableItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction> <jenkins.metrics.impl.TimeInQueueAction plugin="metrics@3.1.2.12"> <queuingDurationMillis>9</queuingDurationMillis> </jenkins.metrics.impl.TimeInQueueAction> </actions> <queueId>5</queueId> <timestamp>1527599156095</timestamp> <startTime>1527599156104</startTime> <result>SUCCESS</result> <duration>3225</duration> <charset>windows-1252</charset> <keepLog>false</keepLog> <builtOn></builtOn> <workspace>C:\workarea\source\github\cloudbees\bluesteel\bluesteel-cjoc\work\workspace\free</workspace> <hudsonVersion>2.107.3-cb-1</hudsonVersion> <scm class="hudson.scm.NullChangeLogParser"/> <culprits class="com.google.common.collect.EmptyImmutableSortedSet"/> </build> {code} |
New:
{{Actions}} created from a {{TransientActionFactory}} are persisted in a {{Run}} when they should never be persisted. If you have a {{TAF}} that creates an action for any {{ModelItem}} then on {{FreeStyleBuild}}s you will end up with 3 duplicate Actions displayed (and 2 will be persisted in the build.xml) One is created for the {{hudson.model.Queue$WaitingItem}} one for the {{hudson.model.Queue$BuildableItem}} and the last one for the actual build (which is the one that is not persisted). {code:title=build.xml|xml} <?xml version='1.1' encoding='UTF-8'?> <build> <actions> <hudson.model.CauseAction> <causeBag class="linked-hash-map"> <entry> <hudson.model.Cause_-UserIdCause> <userId>james</userId> </hudson.model.Cause_-UserIdCause> <int>1</int> </entry> </causeBag> </hudson.model.CauseAction> <com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction plugin="bluesteel-cjoc@1.2.7-SNAPSHOT"> <target>hudson.model.Queue$WaitingItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction> <com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction plugin="bluesteel-cjoc@1.2.7-SNAPSHOT"> <target>hudson.model.Queue$BuildableItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction> <jenkins.metrics.impl.TimeInQueueAction plugin="metrics@3.1.2.12"> <queuingDurationMillis>9</queuingDurationMillis> </jenkins.metrics.impl.TimeInQueueAction> </actions> <queueId>5</queueId> <timestamp>1527599156095</timestamp> <startTime>1527599156104</startTime> <result>SUCCESS</result> <duration>3225</duration> <charset>windows-1252</charset> <keepLog>false</keepLog> <builtOn></builtOn> <workspace>C:\workarea\source\github\cloudbees\bluesteel\bluesteel-cjoc\work\workspace\free</workspace> <hudsonVersion>2.107.3-cb-1</hudsonVersion> <scm class="hudson.scm.NullChangeLogParser"/> <culprits class="com.google.common.collect.EmptyImmutableSortedSet"/> </build> {code} |
Description |
Original:
{{Actions}} created from a {{TransientActionFactory}} are persisted in a {{Run}} when they should never be persisted. If you have a {{TAF}} that creates an action for any {{ModelItem}} then on {{FreeStyleBuild}}s you will end up with 3 duplicate Actions displayed (and 2 will be persisted in the build.xml) One is created for the {{hudson.model.Queue$WaitingItem}} one for the {{hudson.model.Queue$BuildableItem}} and the last one for the actual build (which is the one that is not persisted). {code:title=build.xml|xml} <?xml version='1.1' encoding='UTF-8'?> <build> <actions> <hudson.model.CauseAction> <causeBag class="linked-hash-map"> <entry> <hudson.model.Cause_-UserIdCause> <userId>james</userId> </hudson.model.Cause_-UserIdCause> <int>1</int> </entry> </causeBag> </hudson.model.CauseAction> <com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction plugin="bluesteel-cjoc@1.2.7-SNAPSHOT"> <target>hudson.model.Queue$WaitingItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction> <com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction plugin="bluesteel-cjoc@1.2.7-SNAPSHOT"> <target>hudson.model.Queue$BuildableItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.cloudbees.opscenter.server.bluesteel.action.BlueSteelUrlAction> <jenkins.metrics.impl.TimeInQueueAction plugin="metrics@3.1.2.12"> <queuingDurationMillis>9</queuingDurationMillis> </jenkins.metrics.impl.TimeInQueueAction> </actions> <queueId>5</queueId> <timestamp>1527599156095</timestamp> <startTime>1527599156104</startTime> <result>SUCCESS</result> <duration>3225</duration> <charset>windows-1252</charset> <keepLog>false</keepLog> <builtOn></builtOn> <workspace>C:\workarea\source\github\cloudbees\bluesteel\bluesteel-cjoc\work\workspace\free</workspace> <hudsonVersion>2.107.3-cb-1</hudsonVersion> <scm class="hudson.scm.NullChangeLogParser"/> <culprits class="com.google.common.collect.EmptyImmutableSortedSet"/> </build> {code} |
New:
{{Actions}} created from a {{TransientActionFactory}} are persisted in a {{Run}} when they should never be persisted. If you have a {{TAF}} that creates an action for any {{ModelItem}} then on {{FreeStyleBuild}}s you will end up with 3 duplicate Actions displayed (and 2 will be persisted in the build.xml) One is created for the {{hudson.model.Queue$WaitingItem}} one for the {{hudson.model.Queue$BuildableItem}} and the last one for the actual build (which is the one that is not persisted). {code:title=build.xml|xml} <?xml version='1.1' encoding='UTF-8'?> <build> <actions> <hudson.model.CauseAction> <causeBag class="linked-hash-map"> <entry> <hudson.model.Cause_-UserIdCause> <userId>james</userId> </hudson.model.Cause_-UserIdCause> <int>1</int> </entry> </causeBag> </hudson.model.CauseAction> <com.myco.myplugin.MyAction> <target>hudson.model.Queue$WaitingItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.myco.myplugin.MyAction> <com.myco.myplugin.MyAction> <target>hudson.model.Queue$BuildableItem:hudson.model.FreeStyleProject@11e31cdf[free]:5</target> </com.myco.myplugin.MyAction> <jenkins.metrics.impl.TimeInQueueAction> <queuingDurationMillis>9</queuingDurationMillis> </jenkins.metrics.impl.TimeInQueueAction> </actions> <queueId>5</queueId> <timestamp>1527599156095</timestamp> <startTime>1527599156104</startTime> <result>SUCCESS</result> <duration>3225</duration> <charset>windows-1252</charset> <keepLog>false</keepLog> <builtOn></builtOn> <workspace>C:\workarea\yplugin\work\workspace\free</workspace> <hudsonVersion>2.107.3</hudsonVersion> <scm class="hudson.scm.NullChangeLogParser"/> <culprits class="com.google.common.collect.EmptyImmutableSortedSet"/> </build> {code} |
Remote Link | New: This issue links to "CloudBees Internal CJP-8826 (Web Link)" [ 20759 ] |
Remote Link | New: This issue links to "PR#3462 (Web Link)" [ 20766 ] |
Weird, but I cannot reproduce it.
Please provide version of Jenkins and other plugins you have installed.