-
Notifications
You must be signed in to change notification settings - Fork 899
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
Remove MiqWidget title unique validation #11431
Merged
gtanzillo
merged 2 commits into
ManageIQ:master
from
carbonin:remove_miq_widget_title_unique_validation
Sep 23, 2016
Merged
Remove MiqWidget title unique validation #11431
gtanzillo
merged 2 commits into
ManageIQ:master
from
carbonin:remove_miq_widget_title_unique_validation
Sep 23, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows a user to remove a default widget and recreate a new one with the same title without having the seed blow up with a unique validation error when it runs again. https://bugzilla.redhat.com/show_bug.cgi?id=1375313
This is more reliable now that description is the only unique field.
carbonin
changed the title
Remove miq widget title unique validation
Remove MiqWidget title unique validation
Sep 21, 2016
Checked commits carbonin/manageiq@0f60e7d~...673be4b with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1 app/models/miq_widget.rb
|
👍 I"m good with this change. |
@carbonin @gtanzillo This did not make it into Euwe branch. Please label |
@miq-bot add_label darga/yes |
chessbyte
pushed a commit
that referenced
this pull request
Sep 29, 2016
…e_validation Remove MiqWidget title unique validation (cherry picked from commit ba6fd67)
Euwe Backport details: $ git log
commit 6532a7cc2802a492a69564cdba30b6ddff7dda8a
Author: Gregg Tanzillo <gtanzill@redhat.com>
Date: Fri Sep 23 16:55:15 2016 -0400
Merge pull request #11431 from carbonin/remove_miq_widget_title_unique_validation
Remove MiqWidget title unique validation
(cherry picked from commit ba6fd6712d5679f41e1aecd1d1baf0d372b90d06) |
chessbyte
pushed a commit
that referenced
this pull request
Oct 7, 2016
…e_validation Remove MiqWidget title unique validation (cherry picked from commit ba6fd67) https://bugzilla.redhat.com/show_bug.cgi?id=1379728
Darga Backport details: $ git log
commit 1e978fb02d3a92738a7cd436bc69df3f9d89214e
Author: Gregg Tanzillo <gtanzill@redhat.com>
Date: Fri Sep 23 16:55:15 2016 -0400
Merge pull request #11431 from carbonin/remove_miq_widget_title_unique_validation
Remove MiqWidget title unique validation
(cherry picked from commit ba6fd6712d5679f41e1aecd1d1baf0d372b90d06)
https://bugzilla.redhat.com/show_bug.cgi?id=1379728 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This validation was causing issues when someone deleted a default widget then created a new widget with the same title as the default one, but a different description.
When we restart the server (on an update, for example) we attempt to recreate the default widgets if we can't find them by description, this leads to a unique validation error on the title.
This PR removes the validation and changes one additional lookup by title to a lookup by description.
Also we had to change how the schedule for a widget was created because schedule has a unique validation on
name
which would cause a similar problem during seeding (the widget would get created, but fail to create the schedule).https://bugzilla.redhat.com/show_bug.cgi?id=1375313
@miq-bot add_label bug
@gtanzillo please review
Some alternatives
I'm okay going either of these ways as well