Project

General

Profile

Actions

Bug #21326

closed

Delete DockerMetaTags when docker tags are deleted

Added by Partha Aji over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Container
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

DockerMetaTags are not getting deleted when docker tags are.

Deletion of docker tags only results in the nullification.
What we need to happen is some thing along
if dockerTag.deleted?
check if schema1 meta tag does Not have a schema2 entry and if so delete it.
check if schema2 meta tag does Not have a schema1 entry and if so delete it.
end

To see a good example try the following in a rails or foreman-rake console

>> dmt = ::Katello::DockerMetaTag.first
>> dmt.schema1.try(:destroy) ; dmt.schema2.try(:destroy)
>> dmt = ::Katello::DockerMetaTag.find(dmt.id) # reload
#Actual
<Katello::DockerMetaTag id: 4978, schema1_id: 5753, schema2_id: nil, name: "1.24.2-glibc", repository_id: 3>

#Expected
#ActiveRecord::RecordNotFound: Couldn't find Katello::DockerMetaTag with 'id'=4978
#This operation should fail because deleting the associated docker tags should wipe out the meta tag

Actions #1

Updated by The Foreman Bot over 6 years ago

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

Updated by Eric Helms over 6 years ago

  • translation missing: en.field_release set to 284
Actions #3

Updated by Partha Aji over 6 years ago

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

Updated by Partha Aji over 6 years ago

  • Bugzilla link set to 1515287
Actions #5

Updated by Andrew Kofink over 6 years ago

  • translation missing: en.field_release changed from 284 to 250
Actions

Also available in: Atom PDF