Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullify dependents when destroying configuration_script_sources/configuration_scripts #14567

Merged
merged 1 commit into from
Apr 3, 2017

Conversation

jameswnl
Copy link
Contributor

Fixing https://bugzilla.redhat.com/show_bug.cgi?id=1437108

Once #14432 is in, this similar issue will happen to configuration_scripts and it's children.

@miq-bot add_labels bug, providers/ansible_provider

@miq-bot
Copy link
Member

miq-bot commented Mar 29, 2017

@jameswnl Cannot apply the following label because they are not recognized: providers/ansible_provider

@miq-bot miq-bot added the bug label Mar 29, 2017
@jameswnl
Copy link
Contributor Author

@miq-bot add_labels providers/ansible_tower

@jameswnl
Copy link
Contributor Author

@miq-bot add_label fine/yes

@jameswnl
Copy link
Contributor Author

@miq-bot add_label euwe/no

Copy link
Member

@bdunne bdunne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the BZ reference be removed since this doesn't fix the bug?

@@ -1,5 +1,5 @@
class ConfigurationScriptSource < ApplicationRecord
has_many :configuration_script_payloads
has_many :configuration_script_payloads, :dependent => :nullify
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be :dependent => :destroy since the playbook is an array off of the project in tower.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, meant to change this to :destroy after chatting with @bzwei , but got distracted by other bugs.

Now done. Thanks!

@miq-bot
Copy link
Member

miq-bot commented Apr 3, 2017

Checked commit jameswnl@ff08d81 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks good. 🏆

@bdunne bdunne merged commit 2875c6c into ManageIQ:master Apr 3, 2017
@bdunne bdunne added this to the Sprint 58 Ending Apr 10, 2017 milestone Apr 3, 2017
@jameswnl jameswnl deleted the nullify-dependents branch April 3, 2017 19:49
simaishi pushed a commit that referenced this pull request Apr 3, 2017
Nullify dependents when destroying configuration_script_sources/configuration_scripts
(cherry picked from commit 2875c6c)

https://bugzilla.redhat.com/show_bug.cgi?id=1438594
@simaishi
Copy link
Contributor

simaishi commented Apr 3, 2017

Fine backport details:

$ git log -1
commit 6b6fc31328020bf0182ece02a5708dbf7b6b9a6c
Author: Brandon Dunne <brandondunne@hotmail.com>
Date:   Mon Apr 3 14:45:44 2017 -0400

    Merge pull request #14567 from jameswnl/nullify-dependents
    
    Nullify dependents when destroying configuration_script_sources/configuration_scripts
    (cherry picked from commit 2875c6caf47fae1fce9467e5191862ebc59188b3)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1438594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants