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

Migrate one more feature renamed previously #580

Merged

Conversation

jrafanie
Copy link
Member

@jrafanie jrafanie commented May 25, 2021

NOTE: The PRs below are since lasker so this is needed only on master.

The product feature was renamed along with the others for de-explorization of ansible
tower in: ManageIQ/manageiq#21108

The database migration in #564
handled most of the renames but one feature was missed.

This commit handles automation_manager_add_provider => ems_automation_add_provider.

@jrafanie
Copy link
Member Author

@miq-bot cross_repo_tests ManageIQ/manageiq, ManageIQ/manageiq-ui-classic including ManageIQ/manageiq-schema/580

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request May 25, 2021
@jrafanie jrafanie requested a review from Fryguy May 25, 2021 21:00
@jrafanie jrafanie force-pushed the update_features_renamed_since_lasker branch from 0826e89 to a584d47 Compare May 25, 2021 21:00
@jrafanie
Copy link
Member Author

cross repo is green 💚

@@ -0,0 +1,26 @@
class UpdateProductFeaturesWhereIdentifierWasRenamedSinceLasker < ActiveRecord::Migration[6.0]
class MiqProductFeature < ActiveRecord::Base; end
class MiqRolesFeature < ActiveRecord::Base; end
Copy link
Member

Choose a reason for hiding this comment

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

When the stub is only needed in tests, we do it a little differently, and don't create the stub in the main code...can't recall how offhand, but you can search other specs.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll get to this eventually

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, this is fixed... put the stub in the migration spec itself.

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Jun 2, 2021
The product feature was renamed along with the others for de-explorization of ansible
tower in: ManageIQ/manageiq#21108

The database migration in ManageIQ#564
handled most of the renames but one feature was missed.

This commit handles automation_manager_add_provider => ems_automation_add_provider.
@jrafanie jrafanie force-pushed the update_features_renamed_since_lasker branch from a584d47 to f3d12f0 Compare June 8, 2021 20:43
@miq-bot
Copy link
Member

miq-bot commented Jun 8, 2021

Checked commit jrafanie@f3d12f0 with ruby 2.6.3, rubocop 1.13.0, haml-lint 0.35.0, and yamllint
2 files checked, 2 offenses detected

db/migrate/20210521192754_update_product_features_where_identifier_was_renamed_since_lasker.rb

describe 'product features update' do
it "renamed features aren't removed from user roles" do
features = {}
UpdateProductFeaturesWhereIdentifierWasRenamedSinceLasker::FEATURE_MAPPING.each do |before, _|
Copy link
Member

Choose a reason for hiding this comment

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

super-de-dooper minor, but this can be described_class::FEATURE_MAPPING to save yourself from the long class names.

@Fryguy Fryguy merged commit 3f64af5 into ManageIQ:master Jun 8, 2021
@jrafanie jrafanie deleted the update_features_renamed_since_lasker branch June 9, 2021 14:27
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.

4 participants