Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-19985

Artifact download task takes Artifact from the latest complete build, not from the latest build

    XMLWordPrintable

Details

    Description

      Problem Description:

      Artifact download task takes the artifacts from the latest complete build, not from the latest build.

      Assume the following configuration:
      Plan A produces artifacts, and plan B downloads these artifacts using the Artifact download task. Sometimes, an earlier build of Plan B finishes later than a later build. E.g. build 1 finishes at 01:05, while the build 2 finishes at 01:00.

      Expected behavior:

      Running plan B results in the download of artifacts of build 2 (since it has been build with the most recent revision)

      Actual result:

      Running plan B results in the download of artifacts of build 1

      Steps to reproduce:
      1. Configure the "Clean working directory" task to be the first task in the plan's job configuration.
      2. Configure the plan with a script task:
        echo "first">>test.txt
        sleep 90
        

        Since we are using "sleep 90" ensure you complete the below steps within this time. If you are unable to then please increase this time.

      3. Configure the artifact definition to publish this artifact.
      4. Ensure you have the concurrent build configured and have more than 1 agent to run the builds concurrently.
      5. Execute the build1 of this plan
      6. Modify the script task configuration to the following:
        echo "sec">>test.txt
        
      7. Execute the build 2 of this plan. This will be completed suddenly as we have removed the sleep command.
      • Configure another plan to download the artifact published by the above plan.
      • Execute this plan and observe that this will download the artifact from the latest completed build and not the latest executed build.
      Suggested Solution:

      Enable the "artifact download task" to download the artifact from the latest executed build as it contains the latest updated code.

      Attachments

        Activity

          People

            851f15845f55 Mateusz Szmal
            rsaxena@atlassian.com Robhit Saxena (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: