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

Allow EXPOSE <number>/<protocol> in Dockerfile #17093

Merged
merged 1 commit into from Oct 31, 2017
Merged

Allow EXPOSE <number>/<protocol> in Dockerfile #17093

merged 1 commit into from Oct 31, 2017

Conversation

coreydaley
Copy link
Member

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 30, 2017
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 30, 2017
for _, port := range dockerfileutil.LastExposedPorts(node) {
if _, err := strconv.ParseInt(port, 10, 32); err != nil {
return fmt.Errorf("could not parse %q: must be numeric", port)
errs := make([]string, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we already have parse function for PORT/PROTOCOL somewhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 30, 2017
@coreydaley
Copy link
Member Author

Added test for updated exposedPortsAreValid function
@openshift/sig-developer-experience ptal

@coreydaley coreydaley changed the title [WIP] Allow EXPOSE <number>/<protocol> in Dockerfile Allow EXPOSE <number>/<protocol> in Dockerfile Oct 31, 2017
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 31, 2017
@coreydaley
Copy link
Member Author

/retest

1 similar comment
@coreydaley
Copy link
Member Author

/retest

errs := make([]string, 0)

if strings.HasPrefix(port, "$") {
errs = append(errs, "args are not currently supported for port numbers, did you mean to use config.AllowNonNumericExposedPorts?")
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't know what config.AllowNonNumericExposedPorts is or how to set it. How will our users?

Copy link
Contributor

Choose a reason for hiding this comment

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

(I don't think they even can. it's an internal setting we set to true when invoking new-build)

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

Copy link
Contributor

@bparees bparees left a comment

Choose a reason for hiding this comment

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

one nit and lgtm.

errs := make([]string, 0)

if strings.HasPrefix(port, "$") {
errs = append(errs, "args are not currently supported for port numbers")
Copy link
Contributor

Choose a reason for hiding this comment

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

s/currently//

Copy link
Member Author

Choose a reason for hiding this comment

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

corrected

@bparees bparees added the kind/bug Categorizes issue or PR as related to a bug. label Oct 31, 2017
@bparees
Copy link
Contributor

bparees commented Oct 31, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 31, 2017
@openshift-merge-robot openshift-merge-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed lgtm Indicates that a PR is ready to be merged. labels Oct 31, 2017
@coreydaley
Copy link
Member Author

@bparees removed "currently" from the test

@bparees bparees added the lgtm Indicates that a PR is ready to be merged. label Oct 31, 2017
@openshift-merge-robot openshift-merge-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 31, 2017
@coreydaley
Copy link
Member Author

/retest

@bparees
Copy link
Contributor

bparees commented Oct 31, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 31, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bparees, coreydaley

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 17105, 17036, 17062, 17093).

@openshift-merge-robot openshift-merge-robot merged commit cf510ea into openshift:master Oct 31, 2017
@bparees
Copy link
Contributor

bparees commented Nov 3, 2017

@coreydaley this needs a followup. If the port protocol is UDP then we need to setup the port on the container+service as such. (Currently I think it's always getting set as TCP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants