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

Fixes odo url list for s2i components #3728

Merged

Conversation

mik-dass
Copy link
Contributor

@mik-dass mik-dass commented Aug 10, 2020

What type of PR is this?

/kind bug

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

Fixes odo url list for s2i components with experimental mode on.

Which issue(s) this PR fixes:

Fixes #3474

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

  • turn on experimental mode
  • odo create nodejs --s2i
  • trigger odo url create for both ingress and routes
  • odo url list should display both the URLs

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 10, 2020
@codecov
Copy link

codecov bot commented Aug 10, 2020

Codecov Report

Merging #3728 into master will decrease coverage by 0.78%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3728      +/-   ##
==========================================
- Coverage   44.93%   44.15%   -0.79%     
==========================================
  Files         133      139       +6     
  Lines       12749    13345     +596     
==========================================
+ Hits         5729     5892     +163     
- Misses       6460     6874     +414     
- Partials      560      579      +19     
Impacted Files Coverage Δ
pkg/sync/adapter.go 71.42% <0.00%> (-10.31%) ⬇️
pkg/envinfo/envinfo.go 48.10% <0.00%> (-3.99%) ⬇️
pkg/kclient/volumes.go 90.16% <0.00%> (-3.06%) ⬇️
pkg/devfile/adapters/kubernetes/utils/utils.go 49.47% <0.00%> (-2.75%) ⬇️
pkg/devfile/parser/context/context.go 31.03% <0.00%> (-2.30%) ⬇️
pkg/storage/storage.go 47.65% <0.00%> (-1.83%) ⬇️
...g/devfile/adapters/kubernetes/component/adapter.go 33.96% <0.00%> (-1.20%) ⬇️
pkg/kclient/generators.go 82.85% <0.00%> (-1.09%) ⬇️
pkg/devfile/adapters/common/generic.go 20.00% <0.00%> (-1.06%) ⬇️
pkg/component/component.go 25.76% <0.00%> (-0.04%) ⬇️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf474b1...23ce347. Read the comment docs.

@girishramnani
Copy link
Contributor

unit test on windows failed https://travis-ci.com/github/openshift/odo/jobs/370284958 with the python related error

@girishramnani
Copy link
Contributor

prow passed in 1 try

Copy link
Member

@cdrage cdrage left a comment

Choose a reason for hiding this comment

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

Other than a small change, code looks good!

"github.com/openshift/odo/pkg/odo/genericclioptions"
"github.com/openshift/odo/pkg/odo/util"
odoUtil "github.com/openshift/odo/pkg/odo/util"
Copy link
Member

Choose a reason for hiding this comment

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

better to use odoutil similar to how we do it in different packages. Instead of odoUtil

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 feel odoutil looks weird as it is not a camel case word. I think we should change all occurrences to odoUtil.

Copy link
Member

Choose a reason for hiding this comment

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

Please refer to https://blog.golang.org/package-names

Package names should be short and sweet and not use camel case.

Example:

Package names
Good package names are short and clear. They are lower case, with no under_scores or mixedCaps. They are often simple nouns, such as:

time (provides functionality for measuring and displaying time)
list (implements a doubly linked list)
http (provides HTTP client and server implementations)
The style of names typical of another language might not be idiomatic in a Go program. Here are two examples of names that might be good style in other languages but do not fit well in Go:

computeServiceClient
priority_queue
A Go package may export several types and functions. For example, a compute package could export a Client type with methods for using the service as well as functions for partitioning a compute task across several clients.

Copy link
Member

Choose a reason for hiding this comment

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

for example, below we import ktemplates, we do not use camelCase for that as kTemplates

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Aug 10, 2020
@@ -364,5 +364,21 @@ var _ = Describe("odo devfile url command tests", func() {
output := helper.CmdShouldPass("oc", "get", "routes", "--namespace", namespace)
Expect(output).Should(ContainSubstring(url1))
})

// remove once https://github.com/openshift/odo/issues/3550 is resolved
It("should list URLs for s2i components", func() {
Copy link
Contributor

@amitkrout amitkrout Aug 11, 2020

Choose a reason for hiding this comment

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

+1, Integration test looks good to me.

@adisky
Copy link
Contributor

adisky commented Aug 17, 2020

/lgtm

Copy link
Member

@cdrage cdrage left a comment

Choose a reason for hiding this comment

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

small nitpick, but LGTM code wise

"github.com/openshift/odo/pkg/odo/genericclioptions"
"github.com/openshift/odo/pkg/odo/util"
odoUtil "github.com/openshift/odo/pkg/odo/util"
Copy link
Member

Choose a reason for hiding this comment

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

Please refer to https://blog.golang.org/package-names

Package names should be short and sweet and not use camel case.

Example:

Package names
Good package names are short and clear. They are lower case, with no under_scores or mixedCaps. They are often simple nouns, such as:

time (provides functionality for measuring and displaying time)
list (implements a doubly linked list)
http (provides HTTP client and server implementations)
The style of names typical of another language might not be idiomatic in a Go program. Here are two examples of names that might be good style in other languages but do not fit well in Go:

computeServiceClient
priority_queue
A Go package may export several types and functions. For example, a compute package could export a Client type with methods for using the service as well as functions for partitioning a compute task across several clients.

"github.com/openshift/odo/pkg/odo/genericclioptions"
"github.com/openshift/odo/pkg/odo/util"
odoUtil "github.com/openshift/odo/pkg/odo/util"
Copy link
Member

Choose a reason for hiding this comment

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

for example, below we import ktemplates, we do not use camelCase for that as kTemplates

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Aug 17, 2020
@mik-dass
Copy link
Contributor Author

@cdrage Thanks. I didn't know such a documentation regarding naming exists. I have pushed a commit which fixes this issue.

@mik-dass
Copy link
Contributor Author

--- FAIL: TestPrintSupportedParameters (0.00s)

104

--- FAIL: TestPrintSupportedParameters/Case_1:_Test_print_supported_set_parameters (0.00s)

/retest

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Aug 19, 2020
@mik-dass
Copy link
Contributor Author

  * could not run steps: step integration-e2e failed: ["integration-e2e" pre steps failed: "integration-e2e" pod "integration-e2e-ipi-install-install" failed: the pod ci-op-qx6sw163/integration-e2e-ipi-install-install failed after 54m30s (failed containers: test): ContainerFailed one or more containers exited
Container test exited with code 1, reason Error

/retest

@girishramnani
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: girishramnani

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-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 Aug 20, 2020
@openshift-bot
Copy link

/retest

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

3 similar comments
@openshift-bot
Copy link

/retest

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

@openshift-bot
Copy link

/retest

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

@openshift-bot
Copy link

/retest

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

@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 2e5a781 into redhat-developer:master Aug 20, 2020
@mik-dass mik-dass deleted the fix_exp_url_list branch August 21, 2020 04:46
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 list fails for s2i components if experimental mode is enabled
9 participants