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

odo describe component #5725

Conversation

feloy
Copy link
Contributor

@feloy feloy commented May 10, 2022

What type of PR is this:

/kind feature

What does this PR do / why we need it:

Which issue(s) this PR fixes:

Fixes #5661

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

Doc preview: https://deploy-preview-5725--odo-docusaurus-preview.netlify.app/docs/3.0.0/command-reference/describe

@openshift-ci openshift-ci bot added 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 May 10, 2022
@netlify
Copy link

netlify bot commented May 10, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit cfdff49
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/627cb23bd6e4950009aaa109

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation label May 10, 2022
@odo-robot
Copy link

odo-robot bot commented May 10, 2022

Unit Tests on commit aa325c7 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented May 10, 2022

Windows Tests (OCP) on commit aa325c7 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented May 10, 2022

Kubernetes Tests on commit aa325c7 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented May 10, 2022

OpenShift Tests on commit aa325c7 finished successfully.
View logs: TXT HTML

@feloy feloy force-pushed the feature-5660/describe-component branch from 9d68bb9 to 5687b1d Compare May 10, 2022 09:06
@odo-robot
Copy link

odo-robot bot commented May 10, 2022

Validate Tests on commit aa325c7 finished successfully.
View logs: TXT HTML

@feloy feloy 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 May 10, 2022
@openshift-ci openshift-ci bot added 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 May 10, 2022
@feloy feloy changed the title [wip] odo describe component odo describe component May 10, 2022
@openshift-ci openshift-ci bot 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 May 10, 2022
@feloy feloy requested review from valaparthvi and cdrage May 10, 2022 15:50
Copy link
Contributor

@valaparthvi valaparthvi left a comment

Choose a reason for hiding this comment

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

The changes look good, I only have a few questions/suggestions.

return api.Component{}, err
return api.Component{}, nil, err
}
devfile, err := component.GetDevfileInfoFromCluster(o.clientset.KubernetesClient, name, o.clientset.KubernetesClient.GetCurrentNamespace())
Copy link
Contributor

Choose a reason for hiding this comment

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

If you're going to be passing o.clientset.KubernetesClient, why not just pass that and calculate current namespace in the function? I think you can drop o.clientset.KubernetesClient.GetCurrentNamespace() arg, no?

Also, same comment for L110.

pkg/odo/cli/describe/component.go Outdated Show resolved Hide resolved
pkg/odo/cli/describe/component.go Outdated Show resolved Hide resolved
pkg/odo/cli/describe/component.go Outdated Show resolved Hide resolved
@feloy feloy requested a review from valaparthvi May 11, 2022 06:32
@feloy feloy force-pushed the feature-5660/describe-component branch from 288c4e3 to 52a79c6 Compare May 11, 2022 07:47
Copy link
Contributor

@valaparthvi valaparthvi left a comment

Choose a reason for hiding this comment

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

Thank you for working on those changes, Philippe!

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label May 11, 2022
@feloy feloy requested a review from rm3l May 11, 2022 09:00
Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

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

LGTM, but I had a few small questions (might be enhancements for other PRs) :)

  • In the "Running in" section, do we want to be more specific with the "Debug" Dev mode? Because the command displays "Dev" no matter if I run odo dev or odo dev --debug.
    I found it a bit strange given that the "Supported odo features" section clearly lists "Debug" as a possible feature supported, but this is currently not listed in "Running in" when running in this mode.

  • Also, I understood that the "Supported odo features" information is determined from the current Devfile and currently displays "Unknown" when running with --name. When running with the --name flag, if a mode (Dev and/or Deploy) is detected and listed in the "Running in" section, it means that this feature is supported by odo, no?

❯ odo describe component --name my-app             
Name: my-app
Display Name: Unknown
Project Type: quarkus
Language: Unknown
Version: Unknown
Description: Unknown
Tags: 

Running in: Dev, Deploy

Supported odo features:
 •  Dev: Unknown
 •  Deploy: Unknown
 •  Debug: Unknown

@feloy
Copy link
Contributor Author

feloy commented May 11, 2022

LGTM, but I had a few small questions (might be enhancements for other PRs) :)

  • In the "Running in" section, do we want to be more specific with the "Debug" Dev mode? Because the command displays "Dev" no matter if I run odo dev or odo dev --debug.
    I found it a bit strange given that the "Supported odo features" section clearly lists "Debug" as a possible feature supported, but this is currently not listed in "Running in" when running in this mode.

@kadel That's a good point, do we want to make the difference between the Dev and Debug modes for the running modes?

  • Also, I understood that the "Supported odo features" information is determined from the current Devfile and currently displays "Unknown" when running with --name. When running with the --name flag, if a mode (Dev and/or Deploy) is detected and listed in the "Running in" section, it means that this feature is supported by odo, no?

I think the odo supported features are mostly intended to indicate that we can run the command "odo dev/deploy". Even if the component has been deployed, doesn't mean we can run it now (in this case, we couldn't, because we don't have the Devfile)

@rm3l
Copy link
Member

rm3l commented May 11, 2022

  • Also, I understood that the "Supported odo features" information is determined from the current Devfile and currently displays "Unknown" when running with --name. When running with the --name flag, if a mode (Dev and/or Deploy) is detected and listed in the "Running in" section, it means that this feature is supported by odo, no?

I think the odo supported features are mostly intended to indicate that we can run the command "odo dev/deploy". Even if the component has been deployed, doesn't mean we can run it now (in this case, we couldn't, because we don't have the Devfile)

Okay, I see. Thanks.

feloy and others added 7 commits May 12, 2022 08:32
Co-authored-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Parthvi Vala <pvala@redhat.com>
@feloy feloy force-pushed the feature-5660/describe-component branch from 52a79c6 to edf6332 Compare May 12, 2022 06:34
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. Required by Prow. label May 12, 2022
@feloy feloy force-pushed the feature-5660/describe-component branch from 4a31498 to cfdff49 Compare May 12, 2022 07:07
@sonarcloud
Copy link

sonarcloud bot commented May 12, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@feloy feloy requested review from rm3l and valaparthvi May 12, 2022 07:31
@valaparthvi
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label May 12, 2022
@rm3l
Copy link
Member

rm3l commented May 12, 2022

/approve

@openshift-ci
Copy link

openshift-ci bot commented May 12, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rm3l

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label May 12, 2022
@openshift-merge-robot openshift-merge-robot merged commit cb1546a into redhat-developer:main May 12, 2022
cdrage pushed a commit to cdrage/odo that referenced this pull request Aug 31, 2022
* odo describe component

* More fields on named describe

* Doc

* Update pkg/odo/cli/describe/component.go

Co-authored-by: Parthvi Vala <pvala@redhat.com>

* Update pkg/odo/cli/describe/component.go

Co-authored-by: Parthvi Vala <pvala@redhat.com>

* Update pkg/odo/cli/describe/component.go

Co-authored-by: Parthvi Vala <pvala@redhat.com>

* Add Describef

* Parthvi review

* Fix rebase

Co-authored-by: Parthvi Vala <pvala@redhat.com>
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/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation 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 describe component
4 participants