Details
-
Bug
-
Resolution: Fixed
-
Low
-
8.2.9, 9.2.5, 9.2.8
-
None
-
1
-
Severity 3 - Minor
-
3
-
Description
Problem
Artifacts will be moved to the <Bamboo-Home>/artifacts/globalStorage folder under the following conditions:
- the shared artifact generated by a build has been consumed by a Deployment (Sharing artifacts from a build plan to a deployment environment) AND;
- the build result that originally produced the shared artifact has been deleted (Deleting the results of a plan build) OR expired (Configuring global expiry or Configuring expiry of a plan's job build results).
When there are multiple artifacts in a build plan with the same file names and patterns, artifact transfer of one of the artifacts (having the same file) will not move to globalstorage but logs show Bamboo is moving the artifact. And it removes the artifacts from the <Bamboo-Home>/artifacts folder.
Environment
This issue is observed when using AWS S3 as an artifact handler type in Bamboo.
Steps to Reproduce
- Create a plan called "PROJ-PLAN" with 3 artifacts defined as below:
- Create a deployment dependent on this plan and use the above artifacts of the plan.
- Run multiple builds and deployments of the above.
- Define global expiry with the below configuration:
- Run the global expiry now.
Expected Results
Bamboo should move all the artifacts of the build plan (which are required for deployment, depending on this plan) to globalstorage.
Actual Results
It shows it moves all artifacts of builds to globalstorage as per the below logs; however, it didn't move one of the artifacts (which has a common filename) required for the deployment.
2024-02-01 12:14:57,266 INFO [2-BuildExpiryBean:pool-5-thread-1] [BuildExpiryBeanImpl] Found 3 build(s) to expire for PROJ-PLAN 2024-02-01 12:14:57,266 DEBUG [2-BuildExpiryBean:pool-5-thread-1] [BuildExpiryBeanImpl] Checking expiry for PROJ-PLAN-1 2024-02-01 12:14:57,266 DEBUG [2-BuildExpiryBean:pool-5-thread-1] [BuildExpiryBeanImpl] Removing build result of PROJ-PLAN-1 2024-02-01 12:14:57,321 DEBUG [2-BuildExpiryBean:pool-5-thread-1] [DefaultArtifactLinkManager] Deployment artifact retrieval took 30.49 ms 2024-02-01 12:14:59,206 DEBUG [2-BuildExpiryBean:pool-5-thread-1] [BuildExpiryBeanImpl] Checking expiry for PROJ-PLAN-2 2024-02-01 12:14:59,206 DEBUG [2-BuildExpiryBean:pool-5-thread-1] [BuildExpiryBeanImpl] Removing build result of PROJ-PLAN-2 2024-02-01 12:14:59,227 DEBUG [2-BuildExpiryBean:pool-5-thread-1] [DefaultArtifactLinkManager] Deployment artifact retrieval took 8.099 ms 2024-02-01 12:14:59,230 INFO [2-BuildExpiryBean:pool-5-thread-1] [S3ArtifactHandler] Moving S3 artifact from bamboo-artifacts/plan-819201/shared/build-00002/bye to bamboo-artifacts/globalStorage/1114116 2024-02-01 12:15:01,446 INFO [2-BuildExpiryBean:pool-5-thread-1] [S3ArtifactHandler] Moving S3 artifact from bamboo-artifacts/plan-819201/shared/build-00002/hi to bamboo-artifacts/globalStorage/1114117 2024-02-01 12:15:03,733 INFO [2-BuildExpiryBean:pool-5-thread-1] [S3ArtifactHandler] Moving S3 artifact from bamboo-artifacts/plan-819201/shared/build-00002/hi_re to bamboo-artifacts/globalStorage/1114118 2024-02-01 12:15:06,194 DEBUG [2-BuildExpiryBean:pool-5-thread-1] [BuildExpiryBeanImpl] Checking expiry for PROJ-PLAN-3 2024-02-01 12:15:06,195 DEBUG [2-BuildExpiryBean:pool-5-thread-1] [BuildExpiryBeanImpl] Removing build result of PROJ-PLAN-3 2024-02-01 12:15:06,211 DEBUG [2-BuildExpiryBean:pool-5-thread-1] [DefaultArtifactLinkManager] Deployment artifact retrieval took 2.148 ms 2024-02-01 12:15:06,213 INFO [2-BuildExpiryBean:pool-5-thread-1] [S3ArtifactHandler] Moving S3 artifact from bamboo-artifacts/plan-819201/shared/build-00003/bye to bamboo-artifacts/globalStorage/1114119 2024-02-01 12:15:08,430 INFO [2-BuildExpiryBean:pool-5-thread-1] [S3ArtifactHandler] Moving S3 artifact from bamboo-artifacts/plan-819201/shared/build-00003/hi to bamboo-artifacts/globalStorage/1114120 2024-02-01 12:15:10,660 INFO [2-BuildExpiryBean:pool-5-thread-1] [S3ArtifactHandler] Moving S3 artifact from bamboo-artifacts/plan-819201/shared/build-00003/hi_re to bamboo-artifacts/globalStorage/1114121 2024-02-01 12:15:13,037 INFO [2-BuildExpiryBean:pool-5-thread-1] [BuildExpiryBeanImpl] Affected 3 results in plan PROJ-PLAN
Artifacts are updated in the Bamboo database with "globalstorage" as "true" for those builds:
But one of the artifacts with has common file name has not been moved to globalstorage on the Amazon S3 bucket:
Workaround
Define artifacts in the build plan without duplicate file names.