Bug #34448
closedcontent-view import fails with Error: PG::StringDataRightTruncation: ERROR: value too long for type character varying(255)
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2053329
Description of problem:
Importing a content view with long name + long path into a disconnected Satellite failed with:
Exception:
ActiveRecord::ValueTooLong: PG::StringDataRightTruncation: ERROR: value too long for type character varying(255)
Backtrace:
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/auditor.rb:291:in `block in write_audit'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:139:in `run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/auditor.rb:290:in `write_audit'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/auditor.rb:269:in `audit_create'
Version-Release number of selected component (if applicable):
6.10.2
How reproducible:
East
Steps to Reproduce:
1. create a content view with a long name, for example:
XXXX_Red_Hat_Software_Collections_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64_7Server
2. export and copy the archive to:
/XXX/XXX_Red_Hat_Software_Collections_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64_7Server/1.0/2022-01-29T02-54-30-10-30/
3. run the import:
hammer content-import version --organization-id 1 --path /var/lib/pulp/imports/XXX/XXXX_Red_Hat_Software_Collections_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64_7Server/1.0/2022-01-29T02-54-30-10-30/
Actual results:
The import failed with:
ActiveRecord::ValueTooLong: PG::StringDataRightTruncation: ERROR: value too long for type character varying(255)
Expected results:
The import should be successfully.
Additional info:
Updated by The Foreman Bot almost 3 years ago
- Status changed from New to Ready For Testing
- Assignee set to Jeremy Lenz
- Pull request https://github.com/Katello/katello/pull/9947 added
Updated by Jonathon Turel almost 3 years ago
- Subject changed from content-view import fails with Error: PG::StringDataRightTruncation: ERROR: value too long for type character varying(255) to content-view import fails with Error: PG::StringDataRightTruncation: ERROR: value too long for type character varying(255)
- Target version changed from Katello 4.4.0 to Katello 4.3.2
- Triaged changed from No to Yes
Updated by The Foreman Bot almost 3 years ago
- Fixed in Releases Katello 4.5.0 added
Updated by Jeremy Lenz almost 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|2f05a45705093e535fa4fa80f061a50cb2b08733.