Project

General

Profile

Bug #25378

deleting a repo after deleting a cvv results in "Couldn't find Katello::Content without an ID"

Added by Justin Sherrill about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
High
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

1. create a yum repo
2. publish it in a content view
3. Delete the published CVV
4. Try to delete the yum repo

Couldn't find Katello::Content without an ID (ActiveRecord::RecordNotFound)
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.1/lib/active_record/relation/finder_methods.rb:429:in `find_with_ids'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.1/lib/active_record/relation/finder_methods.rb:69:in `find'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.1/lib/active_record/querying.rb:5:in `find'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/activerecord-5.2.1/lib/active_record/core.rb:167:in `find'
/home/vagrant/git/katello/app/lib/actions/katello/product/content_destroy.rb:22:in `block in plan'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/execution_plan.rb:384:in `switch_flow'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/action.rb:401:in `sequence'
/home/vagrant/git/katello/app/lib/actions/katello/product/content_destroy.rb:7:in `plan'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/action.rb:493:in `block (3 levels) in execute_plan'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware.rb:18:in `pass'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware.rb:35:in `plan'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware/stack.rb:22:in `call'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware.rb:18:in `pass'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware.rb:35:in `plan'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware/stack.rb:22:in `call'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware.rb:18:in `pass'
/home/vagrant/git/katello/app/lib/actions/middleware/keep_locale.rb:7:in `plan'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware/stack.rb:22:in `call'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/home/vagrant/.rvm/gems/ruby-2.5.0/gems/dynflow-1.1.1/lib/dynflow/middleware.rb:18:in `pass'

Related issues

Related to Katello - Refactor #24328: As a developer, repository settings should live on a new repository classClosed

Associated revisions

Revision a07b48df (diff)
Added by Justin Sherrill about 1 year ago

Fixes #25378 - proper content deletion check

previously this check relied on a count of repositories in the db,
however this does not work consistently because repository AR
objects can be deleted in either the plan or finalize phase
of the action. Instead, check for all repositories within
the same root without the expected id. This works no matter
if the repository has been deleted yet or not

History

#1 Updated by Justin Sherrill about 1 year ago

  • Priority changed from Normal to High

#2 Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7809 added

#3 Updated by Justin Sherrill about 1 year ago

  • Related to Refactor #24328: As a developer, repository settings should live on a new repository class added

#4 Updated by Justin Sherrill about 1 year ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Justin Sherrill about 1 year ago

  • Triaged changed from No to Yes

Also available in: Atom PDF