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
[WIP] Remove default value try2 #22923
Open
jrafanie
wants to merge
3
commits into
ManageIQ:master
Choose a base branch
from
jrafanie:remove_default_value_try2
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
Depends on ManageIQ/manageiq-schema#721 Some of the remaining ones have custom defaults in STI or STI-like subclasses, meaning we can't easily replace these with db defaults. Defaults set in a subclass, not base class, in STI/STI like behavior: app/models/miq_provision_request.rb: default_value_for :source_type, "VmOrTemplate" app/models/service_template_provision_request.rb: default_value_for :process, false (overrides base class default) manageiq/providers/embedded_automation_manager/configuration_script_source.rb: attribute :scm_type, :default => "git" manageiq/providers/embedded_automation_manager/configuration_script_source.rb: attribute :scm_branch, :default => "master" manageiq/providers/cloud_manager/template.rb: attribute :cloud, :default => true manageiq/providers/cloud_manager/vm.rb: attribute :cloud, :default => true manageiq/providers/infra_manager/template.rb: attribute :cloud, :default => false manageiq/providers/infra_manager/vm.rb: attribute :cloud, :default => false manageiq/providers/physical_infra_manager/vm.rb: attribute :cloud, :default => false app/models/service_retire_task.rb: default_value_for :request_type, "service_retire" app/models/vm_migrate_task.rb: default_value_for :request_type, "vm_migrate" app/models/vm_retire_task.rb: default_value_for :request_type, "vm_retire" service_reconfigure_request.rb: attribute :source_type, :default => SOURCE_CLASS_NAME service_template_provision_request.rb: attribute :source_type, :default => SOURCE_CLASS_NAME vm_retire_request.rb: attribute :source_type, :default => SOURCE_CLASS_NAME change_column_default :orchestration_stack_retire_tasks, :request_type, :from => nil, :to => "orchestration_stack_retire" Others, use block notation and isn't replaceable with database defaults. We tried attribute defaults before but they trigger "changes" when the defaults get set, which leads to unexpected changes in behavior.
@miq-bot cross-repo-tests /all ManageIQ/manageiq-schema#721 |
miq-bot
pushed a commit
to ManageIQ/manageiq-cross_repo-tests
that referenced
this pull request
Feb 29, 2024
From Pull Request: ManageIQ/manageiq#22923
Checked commits jrafanie/manageiq@0869343~...7fc7ec4 with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint |
This pull request is not mergeable. Please rebase and repush. |
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.
Depends on ManageIQ/manageiq-schema#721