-
Bug
-
Resolution: Fixed
-
Low
-
6.6.1, 8.2.1
-
3
-
Severity 3 - Minor
-
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:
- Configure the "Clean working directory" task to be the first task in the plan's job configuration.
- 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.
- Configure the artifact definition to publish this artifact.
- Ensure you have the concurrent build configured and have more than 1 agent to run the builds concurrently.
- Execute the build1 of this plan
- Modify the script task configuration to the following:
echo "sec">>test.txt
- 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.