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

Consular crashes if a Marathon task has no ports #47

Merged
merged 6 commits into from
Oct 28, 2015

Conversation

JayH5
Copy link
Contributor

@JayH5 JayH5 commented Oct 27, 2015

Related to #29.
We hardcode it... task['port'][0]

* If 0 ports, don't specify a port for the Consul service
* If more than 1 port, use the lowest port
* Fixes pypy tests also just a better way to do things
@JayH5
Copy link
Contributor Author

JayH5 commented Oct 27, 2015

Ready for review.

I'm not tackling multiple ports at the moment because that's significantly more complicated. Will leave up to #29.

[port] = ports
else:
# TODO: Support multiple ports (issue #29)
port = sorted(ports)[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

max() ?

Copy link
Contributor

Choose a reason for hiding this comment

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

err... min()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah lol

@smn
Copy link
Contributor

smn commented Oct 27, 2015

👍 and nice job on splitting it up like this.

JayH5 added a commit that referenced this pull request Oct 28, 2015
Consular crashes if a Marathon task has no ports
@JayH5 JayH5 merged commit 6cbcc81 into develop Oct 28, 2015
@JayH5 JayH5 deleted the feature/issue-47-ports-0 branch October 28, 2015 07:27
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.

None yet

2 participants