Actions
Bug #26535
closedKatello::Content uses removed Katello::Glue::Candlepin::Product.import_product_content
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Description
In #25981, we removed import_product_content
from Katello::Glue::Candlepin::Product
, however, this method is still used in Katello::Content
:
def self.import_all Organization.all.each do |org| org.products.each do |product| begin product_json = Katello::Resources::Candlepin::Product.get(org.label, product.cp_id, %w(productContent)).first product_content_attrs = product_json['productContent'] Katello::Glue::Candlepin::Product.import_product_content(product, product_content_attrs) rescue RestClient::NotFound Rails.logger.warn _("Product with ID %s not found in Candlepin. Skipping content import for it.") % product.cp_id end end end end
I think this code is only called in the katello:reimport
rake task, but that one will fail now.
Updated by Evgeni Golov almost 6 years ago
- Related to Bug #25981: Manifest upload task takes too much time added
Updated by Evgeni Golov almost 6 years ago
This does indeed break katello:reimport
[root@pipeline-katello-nightly-centos7 ~]# foreman-rake katello:reimport Importing Katello::Erratum Importing Katello::PackageGroup Importing Katello::PuppetModule Importing Katello::Rpm Importing Katello::Srpm Importing Katello::ModuleStream Importing Katello::YumMetadataFile Importing Katello::Deb Importing Katello::FileUnit Importing Katello::Subscription Importing Katello::Pool Importing Katello::DockerManifest Importing Katello::DockerManifestList Importing Katello::DockerTag Importing Katello::ContentViewPuppetEnvironment Importing Katello::Content rake aborted! NoMethodError: undefined method `import_product_content' for Katello::Glue::Candlepin::Product:Module Did you mean? import_from_cp /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/models/katello/content.rb:46:in `block (2 levels) in import_all' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/models/katello/content.rb:40:in `block in import_all' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/models/katello/content.rb:39:in `import_all' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/lib/katello/tasks/reimport.rake:41:in `block (3 levels) in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/lib/katello/tasks/reimport.rake:39:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/lib/katello/tasks/reimport.rake:39:in `block (2 levels) in <top (required)>' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>' Tasks: TOP => katello:reimport (See full trace by running task with --trace)
Updated by The Foreman Bot almost 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Jonathon Turel
- Pull request https://github.com/Katello/katello/pull/8065 added
Updated by Jonathon Turel almost 6 years ago
- Target version set to Katello 3.12.0
Updated by Jonathon Turel almost 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|1a4660e9ff71165f7ce0c07df62a855ea166ab55.
Updated by Chris Roberts almost 6 years ago
- Triaged changed from No to Yes
- Fixed in Releases Katello 3.12.0 added
Actions