Verified Production Fix
[gitlab-org/gitlab] Add offline transfer as an import source
GL-gitlab-org/gitlab#592634 • Mar 07, 2026
### ROOT CAUSE
The issue arises because the `Import::HasImportSource` concern does not recognize `:offline_transfer` as a valid import source. Without this, logs generated during offline transfers are not properly categorized, leading to potential confusion with other transfer logs.
### CODE FIX
To address this, we'll add `:offline_transfer` to the list of valid import sources in the `Import::HasImportSource` concern.
**Step-by-step Explanation:**
1. **Locate the Valid Import Sources:** Find where valid import sources are defined in `app/models/concerns/import/has_import_source.rb`.
2. **Add `:offline_transfer`:** Include `:offline_transfer` in the array of valid sources.
3. **Update the Concern:** Ensure the concern correctly handles the new source for logging.
**Code Fix:**
ruby
# app/models/concerns/import/has_import_source.rb
module Import
class HasImportSource
extend ActiveSupport::Concern
VALID_IMPORT_SOURCES = %w[
direct_upload
scheduled_import
background_import
manual_import
incremental_import
bulk_import
offline_transfer
].freeze
# ... rest of the code
end
end
This change adds `:offline_transfer` as a recognized import source, ensuring proper logging and classification.
Deploy with Vultr
Use this fix in production instantly. Claim your high-performance developer credit.
Get Started with Vultr →
digital