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

Reapply "feat: support canary test for multiple load balancers (#80)"… #84

Merged
merged 3 commits into from
Jun 26, 2024

Conversation

keroxp
Copy link
Member

@keroxp keroxp commented Jun 26, 2024

… (#83)

This reverts commit d43c8c5.

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 75.40984% with 75 lines in your changes missing coverage. Please review.

Project coverage is 73.21%. Comparing base (d43c8c5) to head (ba0f5c3).

Files Patch % Lines
canary_task.go 76.49% 31 Missing and 28 partials ⚠️
rollout.go 70.37% 11 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
- Coverage   73.93%   73.21%   -0.72%     
==========================================
  Files          16       17       +1     
  Lines         890      896       +6     
==========================================
- Hits          658      656       -2     
- Misses        134      139       +5     
- Partials       98      101       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@keroxp keroxp requested a review from takkyuuplayer June 26, 2024 06:34
@keroxp
Copy link
Member Author

keroxp commented Jun 26, 2024

@takkyuuplayer Sorry for assigning to review serially. This is exceeded changes for #81 that is temporally reverted in main, including titled feature and refactoring around CanaryTask.

.vscode/settings.json Show resolved Hide resolved
canary_task.go Outdated
Comment on lines 101 to 115
wait := make(chan bool)
go func() {
duration := c.Env.CanaryTaskIdleDuration
for duration > 0 {
log.Infof("still waiting...; %d seconds left", duration)
wt := 10
if duration < 10 {
wt = duration
}
<-c.Time.NewTimer(time.Duration(wt) * time.Second).C
duration -= 10
}
wait <- true
}()
<-wait
Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary goroutine. The below seems enough.

		duration := c.Env.CanaryTaskIdleDuration
		for duration > 0 {
			log.Infof("still waiting...; %d seconds left", duration)
			wt := 10
			if duration < 10 {
				wt = duration
			}
			<-c.Time.NewTimer(time.Duration(wt) * time.Second).C
			duration -= 10
		}

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree and ctx.Done() should also be evaluated with select.

canary_task.go Outdated
return nil
}

func (c *CanaryTask) waitUntilHealthCeheckPassed(ctx context.Context) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

Suggested change
func (c *CanaryTask) waitUntilHealthCeheckPassed(ctx context.Context) error {
func (c *CanaryTask) waitUntilHealthCheckPassed(ctx context.Context) error {

Copy link
Contributor

Choose a reason for hiding this comment

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

typo still exists

Ceheck --> Check

Copy link
Member Author

Choose a reason for hiding this comment

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

I've cehecked!

Copy link
Contributor

@takkyuuplayer takkyuuplayer left a comment

Choose a reason for hiding this comment

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

LGTM!

@takkyuuplayer takkyuuplayer merged commit 27d9a83 into main Jun 26, 2024
2 of 3 checks passed
@takkyuuplayer takkyuuplayer deleted the revrev-0626001 branch June 26, 2024 12:53
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.

2 participants