Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51584

actions from TransientActionFactories are saved in Builds.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core

      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).

       

      build.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>
      

       

            Unassigned Unassigned
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: