Project

General

Profile

Bug #7997

Bad foreign key on docker_image tags relationship causes destroy to fail

Added by David Davis over 5 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Trying to call image.destroy fails with the following error:

DockerImageTest#test_0001_destroy docker image with tags:
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column docker_tags.docker_tag_id does not exist
LINE 1: SELECT "docker_tags".* FROM "docker_tags"  WHERE "docker_tag...
                                                         ^
: SELECT "docker_tags".* FROM "docker_tags"  WHERE "docker_tags"."docker_tag_id" = 7
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/connection_adapters/postgresql_adapter.rb:1163:in `async_exec'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/connection_adapters/postgresql_adapter.rb:1163:in `exec_no_cache'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/connection_adapters/postgresql_adapter.rb:660:in `block in exec_query'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activesupport-3.2.18/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/connection_adapters/postgresql_adapter.rb:659:in `exec_query'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/connection_adapters/postgresql_adapter.rb:1262:in `select'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in `select_all'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/querying.rb:38:in `block in find_by_sql'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/explain.rb:41:in `logging_query_plan'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/querying.rb:37:in `find_by_sql'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/relation.rb:171:in `exec_queries'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/relation.rb:160:in `block in to_a'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/explain.rb:41:in `logging_query_plan'
    /home/dadavis/.rvm/gems/ruby-1.9.3-p545@foreman/gems/activerecord-3.2.18/lib/active_record/relation.rb:159:in `to_a'

Associated revisions

Revision 7753f0fe (diff)
Added by David Davis over 5 years ago

Fixes #7997 - Fixing foreign key on tags relationship for images

Revision 7753f0fe (diff)
Added by David Davis over 5 years ago

Fixes #7997 - Fixing foreign key on tags relationship for images

History

#1 Updated by The Foreman Bot over 5 years ago

  • Status changed from Assigned to Ready For Testing
  • Target version set to 1.7.2
  • Pull request https://github.com/theforeman/foreman-docker/pull/22 added
  • Pull request deleted ()

#2 Updated by David Davis over 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF