1. 02 Dec, 2020 4 commits
  2. 30 Nov, 2020 5 commits
  3. 27 Nov, 2020 1 commit
    • Stan Hu's avatar
      Fix uploader not returning 413 when artifact too large · a9abe0ab
      Stan Hu authored
      When an upload exceeds the maximum limit, `ErrEntityTooLarge` gets
      returned but is wrapped in multiple layers of errors when it is
      checked. As a result, when Google Cloud Storage were used to upload
      files, artifacts exceeding the maximum size would report a "500 Internal
      Server Error" instead of the correct "413 Request Entity Too Large"
      error message.
      
      To fix this, we check the state of `hardLimitReader` and set the error
      to `ErrEntityTooLarge` at the end of the `SaveFileFromReader` to ensure
      that this error will be returned.
      
      Closes https://gitlab.com/gitlab-org/gitlab-workhorse/-/issues/328
      a9abe0ab
  4. 26 Nov, 2020 2 commits
  5. 25 Nov, 2020 2 commits
  6. 24 Nov, 2020 2 commits
  7. 23 Nov, 2020 2 commits
  8. 20 Nov, 2020 5 commits
  9. 19 Nov, 2020 5 commits
  10. 17 Nov, 2020 5 commits
  11. 16 Nov, 2020 1 commit
  12. 14 Nov, 2020 1 commit
    • Stan Hu's avatar
      Return 413 HTTP status for S3 uploads if max upload limit is reached · 9d08495c
      Stan Hu authored
      When an upload (e.g. a CI artifact) reaches the maximum file size limit,
      uploads via S3 would return a 500 error to the user. This made it
      difficult to understand why the upload failed.
      
      This was happening because the `hardLimitReader` was aborting the
      transfer with `ErrEntityTooLarge`, but this error was wrapped in layers
      of AWS errors. Since none of these AWS errors were understood by the
      file handler, a 500 error was returned.
      
      To fix this, AWS has a way to retrieve the original error. We now
      recursively go down the error stack to find the root cause.
      
      Note that there is an open issue in the AWS SDK to make this easier with
      Golang (https://github.com/aws/aws-sdk-go/issues/2820).
      9d08495c
  13. 13 Nov, 2020 5 commits