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

The artifact transfer of one artifact (with the same file) will not move to globalstorage when using Amazon S3 artifact handler type when there are multiple artifacts defined in a build plan with the same file names and patterns.

    XMLWordPrintable

Details

    Description

      Problem

      Artifacts will be moved to the <Bamboo-Home>/artifacts/globalStorage folder under the following conditions:

      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: 

        • hi and hi_re have a common file hi.txt
      • 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.

      Attachments

        Issue Links

          Activity

            People

              0ecd005f55dd Krzysztof Podsiadło
              dac6e1c9d0b2 Jyothi Charupalli
              Votes:
              10 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: