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
Bug 1914196: Use route port field for docker container port in Dockerfile import #7767
Bug 1914196: Use route port field for docker container port in Dockerfile import #7767
Conversation
@rottencandy: This pull request references Bugzilla bug 1914196, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
978de82
to
b6fce68
Compare
/retest |
b6fce68
to
f07c5c7
Compare
if (buildStrategy === 'Docker') { | ||
const port = { containerPort: _.get(formData, 'docker.containerPort'), protocol: 'TCP' }; | ||
if (buildStrategy === 'Docker' && unknownTargetPort) { | ||
const port = { containerPort: _.toInteger(unknownTargetPort), protocol: 'TCP' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of not adding a port at all maybe we can add the defaultUnknownPort
here in case there is no unknownTargetPort
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
f07c5c7
to
15e7b68
Compare
if (buildStrategy === 'Docker') { | ||
const port = { containerPort: _.get(formData, 'docker.containerPort'), protocol: 'TCP' }; | ||
if (buildStrategy === 'Docker' && unknownTargetPort) { | ||
const containerPort = _.toInteger(unknownTargetPort) || defaultUnknownPort; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that you dont need to add defaultUnknownPort
here since there is already a condition below which checks if the ports are empty then use defaultUnknownPort
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed defaultUnknownPort
. Tested without providing containerPort
and defaultUnknownPort
is used if no ports are stated.
/cc @openshift/team-devconsole-ux |
15e7b68
to
a86b185
Compare
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: divyanshiGupta, rohitkrai03, rottencandy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@rottencandy: All pull requests linked via external trackers have merged: Bugzilla bug 1914196 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes:
https://issues.redhat.com/browse/ODC-4866
Analysis / Root cause:
When using the
from dockerfile
add flow, there are 2 similar fields that are used to specify which port the application is listening on: dockerfile conainer port & route target portNo matter what value is entered,
target port
never persisted anywhere.Solution Description:
Remove the docker container port, and use only the route target port to create the service and route.
Screen shots / Gifs for design review:
tmp.mp4
cc: @openshift/team-devconsole-ux
Browser conformance:
/kind bug