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

Removes invalid endpoints from the devfile on triggering url create. #4567

Merged

Conversation

mik-dass
Copy link
Contributor

@mik-dass mik-dass commented Mar 30, 2021

What type of PR is this?

/kind bug

What does does this PR do / why we need it:

It also modifies the error messages when no port is provided.

Which issue(s) this PR fixes:

Fixes #4493

PR acceptance criteria:

How to test changes / Special notes to the reviewer:

  • Download a devfile with an existing URL endpoint and no host information should exist on the env file.
  • Trigger odo url create on a kubernetes cluster.
  • The endpoint which came with the devfile should have host information in the env file.

@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. Required by Prow. kind/bug Categorizes issue or PR as related to a bug. labels Mar 30, 2021
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Mar 30, 2021
@mik-dass mik-dass force-pushed the update_url_create branch 2 times, most recently from 4befc35 to 95fe989 Compare April 8, 2021 13:37
@mik-dass mik-dass changed the title [WIP] Removes invalid endpoints from the devfile on triggering url create. Removes invalid endpoints from the devfile on triggering url create. Apr 8, 2021
@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. Required by Prow. label Apr 8, 2021
@dharmit
Copy link
Member

dharmit commented Apr 12, 2021

/hold

@mik-dass @kadel @scottkurz

There's no response on the discussion on the original issue. While discussing this issue on the planning call, it was the most unclear issue! Everyone was confused about what's wrong with the current behaviour and what's the expectation.

I request more clarity around these matters before starting code.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Apr 12, 2021
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label Apr 12, 2021
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label Apr 21, 2021
@mik-dass
Copy link
Contributor Author

ERRO[2021-04-21T16:32:23Z] [ssh:Fedora 32] !!!Attempt 3!!!              
ERRO[2021-04-21T16:32:23Z] [ssh:Fedora 32] !!!attempt failed due to executor error!!! 
ERRO[2021-04-21T16:32:23Z]  - failed to initialize executor failed to initialize ssh client dial tcp -IP REDACTED-:22: connect: connection timed out

/retest

@dharmit
Copy link
Member

dharmit commented Apr 22, 2021

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Apr 22, 2021
@dharmit
Copy link
Member

dharmit commented Apr 22, 2021

@mik-dass @kadel this one's going to require documentation for odo.dev. IIUC, we've discussed a bunch of scenarios and made changes based on this. At the moment, I don't see a dedicated page to explain odo url behaviour on odo.dev. IMO, it makes sense to have one considering the various scenarios you folks discussed on #4493.

@scottkurz
Copy link
Contributor

This looks good to me !

For the devfile used in https://github.com/OpenLiberty/application-stack-intro/blob/main/devfile.yaml which has a single endpoint:

        - exposure: public
          path: /
          name: ep1
          targetPort: 9080
          protocol: http

the odo url create --host $(minikube ip).nip.io creates URL (in odo env.yaml)

Url:

  • Name: ep1
    Host: 192.168.39.79.nip.io
    Kind: ingress

and without updating the devfile.

Follow-up

Reminding myself we need to go back and update this getting started doc:
https://odo.dev/docs/deploying-a-devfile-using-odo/#deploying-an-open-liberty-application-to-an-openshift--kubernetes-cluster
since it works around the existing behavior.

It's not like we try to explain odo url create in detail but the exact command text will be a bit affected by the new URL

I'll keep an eye on this or let me know, and I can change the doc then.

@mohammedzee1000 mohammedzee1000 changed the base branch from master to main April 28, 2021 08:44
go.mod Outdated
@@ -64,6 +64,7 @@ require (
k8s.io/cli-runtime v0.17.0
k8s.io/client-go v12.0.0+incompatible
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.0.0
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't seem to be used anywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have rebased the PR.

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mik-dass

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

@kadel
Copy link
Member

kadel commented Apr 28, 2021

original devfile

      endpoints:
        - name: http-3000
          targetPort: 3000

after running odo url create using openshift cluster
I ended up with duplicate endpoints for port 3000

    endpoints:
    - name: http-3000
      targetPort: 3000
    - exposure: public
      name: nodejs-nodejs-ex-rshg-3000
      path: /
      protocol: http
      targetPort: 3000

My expectation was that in this case odo url create wouldn't change anything in devfile.

@mik-dass
Copy link
Contributor Author

mik-dass commented Apr 28, 2021

after running odo url create using openshift cluster
I ended up with duplicate endpoints for port 3000

Since http-3000 is valid on a openshift cluster as it doesn't require any host info in the env file, a new endpoint was added.

@kadel
Copy link
Member

kadel commented Apr 28, 2021

after running odo url create using openshift cluster
I ended up with duplicate endpoints for port 3000

Since http-3000 is valid on a openshift cluster as it doesn't require any host info in the env file, a new endpoint was added.

hmm, I can see. That is also a valid angle. ok.

@kadel
Copy link
Member

kadel commented May 6, 2021

/retest

@kadel
Copy link
Member

kadel commented May 6, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label May 6, 2021
@kadel
Copy link
Member

kadel commented May 6, 2021

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label May 6, 2021
@kadel
Copy link
Member

kadel commented May 6, 2021

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label May 6, 2021
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@mik-dass
Copy link
Contributor Author

mik-dass commented May 6, 2021

INFO[2021-05-06T09:49:49Z] • Failure [138.427 seconds]     
INFO[2021-05-06T09:49:49Z] odo supported images e2e tests               
INFO[2021-05-06T09:49:49Z] /go/src/github.com/openshift/odo/tests/e2escenarios/e2e_images_test.go:18 
INFO[2021-05-06T09:49:49Z]   odo supported private registry images deployment 
INFO[2021-05-06T09:49:49Z]   /go/src/github.com/openshift/odo/tests/e2escenarios/e2e_images_test.go:120 
INFO[2021-05-06T09:49:49Z]     Should be able to verify the openjdk-11-rhel8 image [It] 
skipped 1848 lines unfold_more

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label May 6, 2021
It also modifies the error messages when no port is provided.

Signed-off-by: mik-dass <mrinald7@gmail.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. Required by Prow. label May 7, 2021
@openshift-ci
Copy link

openshift-ci bot commented May 7, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mik-dass

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

@mik-dass mik-dass removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label May 10, 2021
@kadel
Copy link
Member

kadel commented May 12, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label May 12, 2021
@scottkurz scottkurz mentioned this pull request May 12, 2021
5 tasks
@openshift-ci
Copy link

openshift-ci bot commented May 12, 2021

@mik-dass: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/psi-openshift-integration-e2e 6d086e9 link /test psi-openshift-integration-e2e
ci/prow/psi-minishift-integration-e2e 6d086e9 link /test psi-minishift-integration-e2e

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit d0abee0 into redhat-developer:main May 12, 2021
@mik-dass mik-dass deleted the update_url_create branch May 12, 2021 20:22
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. Required by Prow. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

odo url create should try to use an existing endpoint in the devfile rather than creating a new one
7 participants