-
Notifications
You must be signed in to change notification settings - Fork 809
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
refactor(StageDefinitionBuilder): Delete deprecated aroundStages #3133
refactor(StageDefinitionBuilder): Delete deprecated aroundStages #3133
Conversation
5e9a870
to
1c9c9ab
Compare
@Override | ||
void afterStages(@Nonnull Stage stage, @Nonnull StageGraphBuilder graph) { | ||
ArrayList<Stage> stages = new ArrayList<>() | ||
HashMap<String, Object> nextStageContext = new HashMap<>() |
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.
Generally speaking, you shouldn't cast the variable with the implementation class, preferring the most common interface that you require. There are exceptions, but I don't believe this is one of them. There's a few spots that this is done in this PR that could be tidied a bit.
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.
thanks!
8e26581
to
d17d046
Compare
Removing deprecated `aroundStages` (deprecated in early 2018) Also, removing `DeployStage`/`DeployStrategyStage` (marked deprecated in 2015) This logically simplifies the stage flow composition and gives us the opportunity for having smarter deploy strategies (which can plan things on failure, etc) - this is already added to the `Strategy` (e.g. `composeFlow` became `composeBeforeFlow`+`composeAfterFlow`) but it's not really taken advantage of [yet]
d17d046
to
1322a1d
Compare
The main issue being resolved here is how we determine if a source ASG is present during R/B deploy. In some cases, the `.asgName` property is used while others `.serverGroupName` is used. If we don't check both, some UI (tasks) operations don't work correctly, e.g. clone with red/black and leave max 2 remaining ASGs will fail to disable the old ASG as well skip the shrink step. While here, I am also making similar change to RRB and MD strategies. Additionally, cleaning up the `composeFlow` -> `composeBefore/AfterFlow` for strategies as a follow up from PR spinnaker#3133
The main issue being resolved here is how we determine if a source ASG is present during R/B deploy. In some cases, the `.asgName` property is used while others `.serverGroupName` is used. If we don't check both, some UI (tasks) operations don't work correctly, e.g. clone with red/black and leave max 2 remaining ASGs will fail to disable the old ASG as well skip the shrink step. While here, I am also making similar change to RRB and MD strategies. Additionally, cleaning up the `composeFlow` -> `composeBefore/AfterFlow` for strategies as a follow up from PR #3133
Removing deprecated
aroundStages
(deprecated in early 2018)Also, removing
DeployStage
/DeployStrategyStage
(marked deprecated in 2015)This logically simplifies the stage flow composition and gives us the opportunity for
having smarter deploy strategies (which can plan things on failure, etc) - this is already
added to the
Strategy
(e.g.composeFlow
becamecomposeBeforeFlow
+composeAfterFlow
)but it's not really taken advantage of [yet]