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

Bug 1874817: fixes issue with route creation in case of no ports exposed #6494

Merged

Conversation

invincibleJai
Copy link
Member

Fixes:

Analysis / Root cause:

  • For Go sample repo builder image is not recommended
  • No Route created if user deploys a Go app via Git import flow/Dev catalog

Solution Description:

  • Update build-tools to support *.go
  • If there are no Ports exposed and use user provided port as target port or default port

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci-robot
Copy link
Contributor

@invincibleJai: This pull request references Bugzilla bug 1874817, 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
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1874817: fixes issue with route creation in case of no ports exposed

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.

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/dev-console Related to dev-console labels Sep 2, 2020
@openshift-ci-robot openshift-ci-robot added component/git-service Related to git-service approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 2, 2020
@invincibleJai
Copy link
Member Author

/assign @divyanshiGupta

Copy link
Contributor

@divyanshiGupta divyanshiGupta left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 2, 2020
@divyanshiGupta
Copy link
Contributor

/lgtm cancel

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Sep 2, 2020
@divyanshiGupta
Copy link
Contributor

divyanshiGupta commented Sep 2, 2020

@invincibleJai I just noticed that if we create a go app using the sample from the new samples catalog then the app is not created since now you have added a check for Source buildStrategy on creation of service and route and thus even when there are no ports and hence no targetPort it tries to create the route and fails.
image

This can be fixed easily by adding defaultUnknownPort: 8080 to ImportSamplePage form initial-values. Since we are not giving an option for editing route properties here so in case of no ports targetPort is always going to be 8080.

@invincibleJai
Copy link
Member Author

@invincibleJai I just noticed that if we create a go app using the sample from the new samples catalog then the app is not created since now you have added a check for Source buildStrategy on creation of service and route and thus even when there are no ports and hence no targetPort it tries to create the route and fails.

This can be fixed easily by adding defaultUnknownPort: 8080 to ImportSamplePage form initial-values. Since we are not giving an option for editing route properties here so in case of no ports targetPort is always going to be 8080.

Thanks @divyanshiGupta , have updated as suggested

@karthikjeeyar
Copy link
Contributor

Route creation happens successfully now, but while editing the go application I am not able to edit the TargetPort.
While creation i have specified the port as 8081, and during editing i am trying to change it to 8080.

@karthikjeeyar
Copy link
Contributor

Verified locally, Editing targetPort values, route creation and builder image detection for on Golang applications works as expected.
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 4, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: invincibleJai, karthikjeeyar

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 0dd9cde into openshift:master Sep 4, 2020
@openshift-ci-robot
Copy link
Contributor

@invincibleJai: All pull requests linked via external trackers have merged:

Bugzilla bug 1874817 has been moved to the MODIFIED state.

In response to this:

Bug 1874817: fixes issue with route creation in case of no ports exposed

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.

@spadgett spadgett added this to the v4.6 milestone Sep 11, 2020
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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/dev-console Related to dev-console component/git-service Related to git-service lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants