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

Evaluate progress condition after progress deadline seconds have passed #765

Merged
merged 7 commits into from
Jan 20, 2021

Conversation

ruionweb
Copy link
Contributor

@ruionweb ruionweb commented Nov 18, 2020

This change checks for the progress condition of a k8s deployment type after the progress deadline seconds have passed.
ie. when a deployment has been marked as failed to progress, we will wait for at least PDS seconds after a deploy/retry to mark it failed, instead of failing it right away

Note this assumes that @deploy_started_at is reset during retries as the DeployTask creates a new instance of resource_deployer each time.

cc @Shopify/pipeline

@@ -155,6 +155,7 @@ def rollout_annotation_err_msg

def deploy_failing_to_progress?
return false unless progress_condition.present?
return false if deploy_started? && Time.now.utc - @deploy_started_at < progress_deadline
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth a comment here, since the deploy is indeed failing to progress, we're just ignoring that for now :)

@ruionweb ruionweb marked this pull request as ready for review November 18, 2020 22:02
@ruionweb ruionweb requested a review from a team as a code owner November 18, 2020 22:02
@ruionweb ruionweb requested a review from dturn November 18, 2020 22:06
Copy link
Contributor

@dturn dturn left a comment

Choose a reason for hiding this comment

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

Code looks good, can you update the readme and changelog before merging

lib/krane/kubernetes_resource/deployment.rb Outdated Show resolved Hide resolved
@ruionweb ruionweb mentioned this pull request Nov 20, 2020
@gigr gigr force-pushed the fast-fail-progress-deadline branch from 5bb8a48 to aaa2486 Compare January 7, 2021 20:08
@gigr gigr force-pushed the fast-fail-progress-deadline branch from aaa2486 to e58c95d Compare January 7, 2021 20:15
@timothysmith0609 timothysmith0609 merged commit 75f9a3f into master Jan 20, 2021
@timothysmith0609 timothysmith0609 deleted the fast-fail-progress-deadline branch January 20, 2021 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants