-
Notifications
You must be signed in to change notification settings - Fork 811
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
Fix/blue green deploy #4414
Merged
Merged
Fix/blue green deploy #4414
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
kkotula
commented
Mar 21, 2023
.../main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java
Show resolved
Hide resolved
kkotula
commented
Mar 21, 2023
.../main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java
Show resolved
Hide resolved
mattgogerly
approved these changes
Mar 21, 2023
...t/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStageTest.java
Show resolved
Hide resolved
armory-abedonik
approved these changes
Mar 22, 2023
ovidiupopa07
approved these changes
Mar 22, 2023
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.
Lgtm
@mergify backport release-1.27.x release-1.28.x release-1.29.x |
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Mar 27, 2023
* fix(blue-green-deploy): removing old failed manifests * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): added docs * fix(blue-green-deploy): added test to validate new behaviour (cherry picked from commit 5156eec) # Conflicts: # orca-clouddriver/src/main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java # orca-clouddriver/src/test/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStageTest.java
mergify bot
pushed a commit
that referenced
this pull request
Mar 27, 2023
* fix(blue-green-deploy): removing old failed manifests * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): added docs * fix(blue-green-deploy): added test to validate new behaviour (cherry picked from commit 5156eec) # Conflicts: # orca-clouddriver/src/main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java # orca-clouddriver/src/test/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStageTest.java
mergify bot
pushed a commit
that referenced
this pull request
Mar 27, 2023
* fix(blue-green-deploy): removing old failed manifests * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): added docs * fix(blue-green-deploy): added test to validate new behaviour (cherry picked from commit 5156eec) # Conflicts: # orca-clouddriver/src/main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java # orca-clouddriver/src/test/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStageTest.java
This was referenced Mar 27, 2023
dogonthehorizon
pushed a commit
that referenced
this pull request
Mar 28, 2023
* Fix/blue green deploy (#4414) * fix(blue-green-deploy): removing old failed manifests * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): added docs * fix(blue-green-deploy): added test to validate new behaviour (cherry picked from commit 5156eec) # Conflicts: # orca-clouddriver/src/main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java # orca-clouddriver/src/test/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStageTest.java * chore(conflict): resolved conflicts (#4422) --------- Co-authored-by: Krzysztof Kotula <[email protected]> Co-authored-by: ovidiupopa07 <[email protected]>
dogonthehorizon
pushed a commit
that referenced
this pull request
Mar 28, 2023
* Fix/blue green deploy (#4414) * fix(blue-green-deploy): removing old failed manifests * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): added docs * fix(blue-green-deploy): added test to validate new behaviour (cherry picked from commit 5156eec) # Conflicts: # orca-clouddriver/src/main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java # orca-clouddriver/src/test/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStageTest.java * chore(conflict): resolved conflicts (#4423) --------- Co-authored-by: Krzysztof Kotula <[email protected]> Co-authored-by: ovidiupopa07 <[email protected]>
dogonthehorizon
pushed a commit
that referenced
this pull request
Mar 28, 2023
* Fix/blue green deploy (#4414) * fix(blue-green-deploy): removing old failed manifests * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): added docs * fix(blue-green-deploy): added test to validate new behaviour (cherry picked from commit 5156eec) # Conflicts: # orca-clouddriver/src/main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java # orca-clouddriver/src/test/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStageTest.java * chore(conflict): resolved conflicts (#4421) --------- Co-authored-by: Krzysztof Kotula <[email protected]> Co-authored-by: ovidiupopa07 <[email protected]>
yugaa22
pushed a commit
to OpsMx/orca-oes
that referenced
this pull request
Jun 26, 2023
* fix(blue-green-deploy): removing old failed manifests * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): refactoring * fix(blue-green-deploy): added docs * fix(blue-green-deploy): added test to validate new behaviour
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto merged
Merged automatically by a bot
ready to merge
Approved and ready for merge
target-release/1.30
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.
This PR addresses an interesting bug observed while using Blue/Green (Red/Black) deployment.
If the first replica set deployment fails (e.g. due to an incorrect image), a consecutive deployment with a fixed image name would also fail. This was due to one of the new deployment stages disabling the previous deployment. The DisableManifestStage waits for the manifest to stabilize, which never happens since the original pods were not running in the first place.
In this PR, I attempt to tackle the problem by verifying the old manifest status. When it is not stable but not failed, we are dealing with the situation described above.
I also made slight refactoring to the existing code. The primary focus of the refactoring was to extract new helper classes that encapsulate some parts of the existing logic.