Skip to content

Better error messages for package processing errors in the UI

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Problem to solve

From a conversation in this MR: !61134 (comment 571150878)

When packages are published to the registry, they are not always fully processed. To help the push and pull process more efficient, processing of the package is done post-push from the user. Sometimes, these packages fail to fully publish and are in an error state. The UI only provides a generic "There was an error" kind of remark.

Scenarios and Error Messages

Package format Scenario Exception Error message
Debian Debian package has no metadata ArgumentError package file without Debian metadata
Debian Package file distribution_name is blank ArgumentError missing distribution name
Debian Package file component_name is blank ArgumentError missing component name
Debian package file is not deb, ddeb or udeb ArgumentError invalid package file type
Debian package exists in another distribution ArgumentError Debian package #{package_name} #{package_version} exists in distribution in #{other_distribution_codename}
Debian Changes file distribution_name is blank ArgumentError unwanted distribution name
Debian Changes file component_name is blank ArgumentError unwanted component name
Debian Changes file metadata has blank Source field ArgumentError missing Source field
Debian Changes file metadata has blank Version field ArgumentError missing Version field
Debian Changes file metadata has blank Distribution field ArgumentError missing Distribution field
Debian All other errors StandardError Unexpected error: <exception class>
Helm YAML has invalid values ActiveRecord::Invalid Validation failed
Helm Empty package file ::Packages::Helm::ExtractFileMetadataService::ExtractionError Chart.yaml not found within a directory
Helm Invalid Chart.yaml ::Packages::Helm::ExtractFileMetadataService::ExtractionError Error while parsing Chart.yaml
Helm All other errors StandardError Unexpected error: <exception class>
Nuget .nupkg file is not a valid Zip file ::Packages::Nuget::UpdatePackageFromMetadataService::ZipError Could not open the .nupkg file
Nuget .nupkg file has invalid metadata ::Packages::Nuget::UpdatePackageFromMetadataService::InvalidMetadataError package name, version, authors and/or description not found in metadata
Nuget All other errors StandardError Unexpected error: <exception class>
Rubygems File I/O error while opening the gem file ::Packages::Rubygems::ProcessGemService::ExtractionError Unable to read gem file
Rubygems A metadata field exceeds the text limit ActiveRecord::StatementInvalid Unexpected error: ActiveRecord::StatementInvalid [1]
Rubygems All other errors StandardError Unexpected error: <exception class>

Proposal

Show detailed error messages: Screen_Shot_2022-06-03_at_15.13.42

Edited by Tim Rizzi