Deployment logs are named with a negative value and cannot be directly accessed via the UI, once DEPLOYMENT_RESULT primary key surpasses 32bit int

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 6.5.0
    • Affects Version/s: 6.3.2
    • Component/s: Deployments
    • None
    • Severity 3 - Minor

      Issue Summary

      Once primary key surpasses 32bit int deployment logs are named differently and cannot be directly accessed via the UI.

      The log file is saved with the signed 32bit deployment result id on disk however the link expects the actual big int filename.

      For example:
      2012545028-2154037258-2170683537.log becomes 2012545028-2154037258--2124283705.log because the last number, 2170683537 == -2124283705 after the conversion.

      When attempting to download the deployment log, you get Page not found.

      Steps to Reproduce

      1. When deployment_result_id reaches 2,147,483,648 (max int + 1), perform a release
      2. Attempt to download the log

      Expected Results

      The log can be downloaded.

      Actual Results

      The log is visible as a snippet in the deployment result.
      When attempting to download the full deployment log, you get Page not found.

      The below exception is thrown in the atlassian-bamboo.log file:

      2020-02-12 04:11:22,520 ERROR [http-apr-8085-exec-38] [AbstractDownloadStrategy] File does not exist/can't be read: /var/bamboo-home/xml-data/builds/2012545028-2154037258/download-data/build_logs/2012545028-2154037258-2170683537.log
      

      Workaround

      1. Click Download log
      2. When presented with the Page not found, truncate the log file from the URL. Example:
      3. $BAMBOO_BASE_URL/deployment-download/2154037258/build_logs/2012545028-2154037258-2170683537.log becomes
      4. $BAMBOO_BASE_URL/deployment-download/2154037258/build_logs
      5. You will now be presented with a directory listing of all the log files for that environment; choose the one with the matching timestamp of the deployment result.

              Assignee:
              Krystian Brazulewicz
              Reporter:
              Jeremy Owen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: