Skip to content

Conversation

@ShotaKitazawa
Copy link
Contributor

@ShotaKitazawa ShotaKitazawa commented Dec 9, 2020

What this PR does / why we need it:
fix WAIT stage in KubernetesApp

Which issue(s) this PR fixes:

Fixes #1225

Does this PR introduce a user-facing change?:

Fix the bug that the WAIT stage does not wait for the specified duration

@nghialv nghialv changed the title fix wait stage Fix the bug that WAIT stage does not wait for the specified duration Dec 10, 2020
return originalStatus
default:
return model.StageStatus_STAGE_FAILURE
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: Could you please change to use a return instead of the break at line 90.

for {
   select {
   case <- timer.C:
      	e.LogPersister.Infof("Waited for %v", totalDuration)
	return model.StageStatus_STAGE_SUCCESS
   
   case <-ticker.C:
        e.LogPersister.Infof("%v elapsed...", time.Since(startTime))

   case s := <-sig.Ch():
        ....
   }
}
}

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, I fixed it in git commit --amend

@nghialv
Copy link
Member

nghialv commented Dec 10, 2020

/trigger presubmits

@pipecd-bot
Copy link
Collaborator

TRIGGER

@nghialv: Your requested presubmits has been scheduled in response to this comment.

@nghialv
Copy link
Member

nghialv commented Dec 10, 2020

@ShotaKitazawa Thank you very much.
/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by nghialv.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 33.96%. This pull request does not change code coverage.

@pipecd-bot pipecd-bot merged commit f5cdc81 into pipe-cd:master Dec 10, 2020
@ShotaKitazawa ShotaKitazawa deleted the piped-wait branch December 10, 2020 13:32
@pipecd-bot pipecd-bot mentioned this pull request Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In WAIT stage in KubernetesApp, do not wait for more than 10 seconds.

3 participants