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

order of post build actions not being respected

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Not A Defect
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      We have multiple post build actions and one of them was to delete the workspace. What i noticed is that even if that action is the last one (assuming the order they appear in is the order they are executed) it was executed earlier. Noticed this because other post build actions wanted to refer to scripts/files in the workspace.

        Attachments

          Activity

          Hide
          arpitgupta Arpit Gupta added a comment - - edited

          Also do not recall exactly what version of jenkins it started in. We are currently on 1.607

          I had sent a mail to the user list but did not get a definitive answer if the assumption that the order in which the post build actions are specified are the order they will be executed in so i decided to log this bug.

          Show
          arpitgupta Arpit Gupta added a comment - - edited Also do not recall exactly what version of jenkins it started in. We are currently on 1.607 I had sent a mail to the user list but did not get a definitive answer if the assumption that the order in which the post build actions are specified are the order they will be executed in so i decided to log this bug.
          Hide
          danielbeck Daniel Beck added a comment -

          Not a defect (or at least, more information is needed to consider this a valid bug report). The implementation type of post-build steps classifies them as one of three or so groups that are executed in that order. This overrides any UI order specified.

          Documentation:
          http://javadoc.jenkins-ci.org/hudson/tasks/Recorder.html
          http://javadoc.jenkins-ci.org/hudson/tasks/Notifier.html

          Show
          danielbeck Daniel Beck added a comment - Not a defect (or at least, more information is needed to consider this a valid bug report). The implementation type of post-build steps classifies them as one of three or so groups that are executed in that order. This overrides any UI order specified. Documentation: http://javadoc.jenkins-ci.org/hudson/tasks/Recorder.html http://javadoc.jenkins-ci.org/hudson/tasks/Notifier.html
          Hide
          danielbeck Daniel Beck added a comment -

          Also, just because you did not get an answer on the mailing list is not a reason to file a bug report.

          Show
          danielbeck Daniel Beck added a comment - Also, just because you did not get an answer on the mailing list is not a reason to file a bug report.
          Hide
          arpitgupta Arpit Gupta added a comment -

          @Daniel would this be a request to the plugin then? I saw this just with the delete workspace post build action. It would run before other post build actions. How do i determine what order would that fall under?

          Show
          arpitgupta Arpit Gupta added a comment - @Daniel would this be a request to the plugin then? I saw this just with the delete workspace post build action. It would run before other post build actions. How do i determine what order would that fall under?
          Hide
          arpitgupta Arpit Gupta added a comment -

          Also, just because you did not get an answer on the mailing list is not a reason to file a bug report.

          I agree its not ideal. What would you recommend? Should i email the dev group?

          Show
          arpitgupta Arpit Gupta added a comment - Also, just because you did not get an answer on the mailing list is not a reason to file a bug report. I agree its not ideal. What would you recommend? Should i email the dev group?
          Hide
          danielbeck Daniel Beck added a comment -

          I agree its not ideal. What would you recommend? Should i email the dev group?

          I don't think this qualifies as a dev list question (especially given the fact the source of this behavior really easy to find if you only do a little leg work). Readers may be knowledgable, but if they're interested in answering user questions and have the time, they'll read the users list.

          The exception is if you want to figure out yourself what's going on in core (assuming you know Java well enough to go that route at all), did the research, and still cannot figure it out. As usual http://www.catb.org/esr/faqs/smart-questions.html#before applies.

          @Daniel would this be a request to the plugin then? I saw this just with the delete workspace post build action. It would run before other post build actions.

          Workspace Cleanup plugin, assuming this is what you use, declares its post-build action needs to run as pretty much the last step (needsToRunAfterFinalized is true, and it's a Notifier).

          How do i determine what order would that fall under?

          Not sure what you mean, but running Jenkins in a debugger would help determine why it executes things in a specific order. Don't know whether it logs anything relevant, but I doubt it.

          If you determine then that core misbehaves, that would be the basis for a great issue report.

          Show
          danielbeck Daniel Beck added a comment - I agree its not ideal. What would you recommend? Should i email the dev group? I don't think this qualifies as a dev list question (especially given the fact the source of this behavior really easy to find if you only do a little leg work). Readers may be knowledgable, but if they're interested in answering user questions and have the time, they'll read the users list. The exception is if you want to figure out yourself what's going on in core (assuming you know Java well enough to go that route at all), did the research, and still cannot figure it out. As usual http://www.catb.org/esr/faqs/smart-questions.html#before applies. @Daniel would this be a request to the plugin then? I saw this just with the delete workspace post build action. It would run before other post build actions. Workspace Cleanup plugin, assuming this is what you use, declares its post-build action needs to run as pretty much the last step (needsToRunAfterFinalized is true, and it's a Notifier). How do i determine what order would that fall under? Not sure what you mean, but running Jenkins in a debugger would help determine why it executes things in a specific order. Don't know whether it logs anything relevant, but I doubt it. If you determine then that core misbehaves, that would be the basis for a great issue report.

            People

            • Assignee:
              Unassigned
              Reporter:
              arpitgupta Arpit Gupta
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: