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

Builds will not fail when S3 artifact handler is unsuccessful

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 9.4.2, 9.3.6, 9.2.11, 9.5.1, 9.2.12
    • Artifacts, Builds
    • None

    Description

      Issue Summary

      This is reproducible on Data Center:

      If an S3 artifact handler is used in Bamboo and contains invalid/outdated credentials or broken permissions, builds will still report as successful even if artifacts can't be uploaded to the S3 bucket due to broken credentials. This is also valid when using custom artifact handlers.

      Steps to Reproduce

      1. Configure an S3 artifact handler, or custom artifact handler to a Plan. Use a valid AWS credential
      2. Expire or invalidate the credentials in AWS or misconfigure region/bucket names (break it!)
      3. Run a Plan that contains an artifact to be uploaded to the S3 bucket
      4. Observe the build logs

      Expected Results

      The build should fail and report that the S3 artifact upload operation failed

      Note: If "Required" is selected in the artifact configuration, the build fails as expected. This is in line with the "Required" setting that ensures the build fails if the artifact can't be published. However, the description does not clarify whether it should bypass all errors, including those arising from external factors. For instance, when the artifact is successfully created but fails to upload due to incorrect SFTP and S3 permissions or credentials configuration.

      Actual Results

      The build succeeds, and reports the following in the logs:

      09-Feb-2024 12:20:40	Failing as no matching files has been found and empty artifacts are not allowed on S3.
      09-Feb-2024 12:20:40	Unable to publish artifact [build-result]: 
      09-Feb-2024 12:20:44	Artifact transfer failed The AWS Access Key Id you provided does not exist in our records. (Service: Amazon S3; Status Code: 403; Error Code: InvalidAccessKeyId; Request ID: 2WN6TMNHEG32P8KH; S3 Extended Request ID: bQjQBwejZzX2N7PPkETKpjkO0oqDJhH5KI1QbbbqVkzlUihCSi7XNHTZhlRBw4oZOQEPD4Yj3vw=; Proxy: null)
      09-Feb-2024 12:20:44	com.atlassian.bamboo.build.artifact.S3ArtifactHandler: The AWS Access Key Id you provided does not exist in our records. (Service: Amazon S3; Status Code: 403; Error Code: InvalidAccessKeyId; Request ID: 2WN6TMNHEG32P8KH; S3 Extended Request ID: bQjQBwejZzX2N7PPkETKpjkO0oqDJhH5KI1QbbbqVkzlUihCSi7XNHTZhlRBw4oZOQEPD4Yj3vw=; Proxy: null)
      09-Feb-2024 12:20:44	Unable to publish artifact [hello]: Unable to publish artifact Non required shared artifact Http Compression On : [hello], patterns: [hello.txt] for BAM-BOO-FJ-111 via com.atlassian.bamboo.build.artifact.S3ArtifactHandler@d2b9994 
      

      Workaround

      1. Review the global AWS credentials or custom S3 Artifact handler setup for credentials and Region x Bucket name.
      2. Select "Required" on the Artifact definition properties

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              73868399605e Eduardo Alvarenga
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: