-
Notifications
You must be signed in to change notification settings - Fork 897
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
Add retired to service active states #18348
Add retired to service active states #18348
Conversation
6f1407b
to
a58047d
Compare
@miq-bot add_label bug |
@@ -1,6 +1,7 @@ | |||
class ServiceRetireRequest < MiqRetireRequest | |||
TASK_DESCRIPTION = 'Service Retire'.freeze | |||
SOURCE_CLASS_NAME = 'Service'.freeze | |||
ACTIVE_STATES = %w(retired) + base_class::ACTIVE_STATES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR, but "retired" doesn't sound like an active state, a better name for the validation to use might be VALID_STATES.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, I told her about this yesterday.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@d-m-u @bdunne I know it looks odd, and we can rename it in the future, but retired is an active state.
Reconfigured and migrated are active states as well.
Most of our lifecycle state machines have multiple states for each of 3 phases:
- Pre-processing
- Execution/Check Execution <---- the state would be provisioned/retired/reconfigured/migrated here
- Post-processing <----- It still has to process these states before it can be finished.
The state is "finished" at the end of the state machine.
a58047d
to
a6cc73c
Compare
Checked commit d-m-u@a6cc73c with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@d-m-u assume |
…states Add retired to service active states (cherry picked from commit 35c0f17) https://bugzilla.redhat.com/show_bug.cgi?id=1672700
Hammer backport details:
|
We validate the request state in
manageiq/app/models/miq_retire_request.rb
Line 3 in 33d994a
Should've been a part of #18283.
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1666834