Commit 46e8efc2 authored by Rémy Coutable's avatar Rémy Coutable Committed by Robert Speicher

Merge branch 'fix/import-export-log' into 'master'

Fix log statements in import/export

Fixes - as seen in the logs:
```
Import/Export error raised on /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/import_export/file_importer.rb:19:in `rescue in import': undefined method `message' for #<String:0x007fc45e977e10>
```

See merge request !5129
(cherry picked from commit 3c89a788)
parent f17ae705
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 8.9.6 v 8.9.6
- Fix log statements in import/export. !5129
- Fix broken migration in MySQL. !5005 - Fix broken migration in MySQL. !5005
v 8.9.5 v 8.9.5
......
...@@ -29,7 +29,7 @@ module Gitlab ...@@ -29,7 +29,7 @@ module Gitlab
def execute(cmd) def execute(cmd)
output, status = Gitlab::Popen.popen(cmd) output, status = Gitlab::Popen.popen(cmd)
@shared.error(output.to_s) unless status.zero? @shared.error(Gitlab::ImportExport::Error.new(output.to_s)) unless status.zero?
status.zero? status.zero?
end end
......
...@@ -17,7 +17,7 @@ module Gitlab ...@@ -17,7 +17,7 @@ module Gitlab
Rails.logger.info("Saved project export #{archive_file}") Rails.logger.info("Saved project export #{archive_file}")
archive_file archive_file
else else
@shared.error("Unable to save #{archive_file} into #{@shared.export_path}") @shared.error(Gitlab::ImportExport::Error.new("Unable to save #{archive_file} into #{@shared.export_path}"))
false false
end end
rescue => e rescue => e
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment