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

Fixes #108 | Bounds checking for port index #145

Merged
merged 1 commit into from
Dec 1, 2016

Conversation

janisz
Copy link
Contributor

@janisz janisz commented Nov 30, 2016

No description provided.

@janisz janisz changed the title Fixes #108 | Bound checking for port index Fixes #108 | Bounds checking for port index Nov 30, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 82.597% when pulling c602dbe on fixes/out_of_bounds_error into cf1abbb on master.

@janisz janisz force-pushed the fixes/out_of_bounds_error branch from c602dbe to 8e44a71 Compare November 30, 2016 15:35
@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 82.597% when pulling 8e44a71 on fixes/out_of_bounds_error into cf1abbb on master.

@@ -348,6 +349,15 @@ func (c *Consul) marathonToConsulChecks(task *apps.Task, healthChecks []apps.Hea
return checks
}

func getHealthCheckPort(check apps.HealthCheck, task apps.Task) (int, error) {
if check.Port != 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

What if check.Port will be a negative integer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing, we will try to register it int consul. If this fail we will log error.

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO you should reject invalid health check port definition.

Copy link
Contributor

@medzin medzin left a comment

Choose a reason for hiding this comment

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

Answer questions.

@janisz janisz force-pushed the fixes/out_of_bounds_error branch from 8e44a71 to 3f3afc5 Compare December 1, 2016 12:03
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 82.428% when pulling 3f3afc5 on fixes/out_of_bounds_error into fb4e1cc on master.

@janisz janisz merged commit 6867a85 into master Dec 1, 2016
@janisz janisz deleted the fixes/out_of_bounds_error branch December 1, 2016 12:19
@janisz janisz removed the in progress label Dec 1, 2016
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