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

refactor(StageDefinitionBuilder): Delete deprecated aroundStages #3133

Merged

Conversation

marchello2000
Copy link
Contributor

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]

@Override
void afterStages(@Nonnull Stage stage, @Nonnull StageGraphBuilder graph) {
ArrayList<Stage> stages = new ArrayList<>()
HashMap<String, Object> nextStageContext = new HashMap<>()
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks!

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]
@marchello2000 marchello2000 merged commit fba04ec into spinnaker:master Sep 19, 2019
marchello2000 added a commit to marchello2000/orca that referenced this pull request Sep 20, 2019
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
marchello2000 added a commit that referenced this pull request Sep 20, 2019
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
@marchello2000 marchello2000 deleted the mark/remove_aroundStages_master branch November 1, 2019 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants