-
Notifications
You must be signed in to change notification settings - Fork 244
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
Implement "odo list" #6043
Implement "odo list" #6043
Conversation
✅ Deploy Preview for odo-docusaurus-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
df200e6
to
de50759
Compare
de50759
to
f03bcbe
Compare
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.
The code lgtm apart from the one question.
var localComponent api.ComponentAbstract | ||
if devObj.Data != nil { | ||
localComponent = api.ComponentAbstract{ | ||
Name: devObj.Data.GetMetadata().Name, | ||
ManagedBy: "", | ||
RunningIn: []api.RunningMode{}, | ||
Type: GetComponentTypeFromDevfileMetadata(devObj.Data.GetMetadata()), | ||
} | ||
} | ||
|
||
componentInDevfile := "" | ||
if localComponent.Name != "" { | ||
if !Contains(localComponent, devfileComponents) { | ||
devfileComponents = append(devfileComponents, localComponent) | ||
} | ||
componentInDevfile = localComponent.Name | ||
} |
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.
Do we want to print the local component/binding if --namespace is passed? I find it a little confusing to display the binding/component running in some other namespace to be displayed when I explicitly ask for some other namespace.
➜ 102 odo list binding --namespace operators
✓ Listing ServiceBindings from the namespace "operators" [3ms]
NAME APPLICATION SERVICES RUNNING IN
* my-nodejs-app-cluster-sample my-nodejs-app-app (Deployment) cluster-sample (Cluster.postgresql.k8s.enterprisedb.io) None
➜ 102 odo list binding
✓ Listing ServiceBindings from the namespace "default" [9ms]
NAME APPLICATION SERVICES RUNNING IN
* my-nodejs-app-cluster-sample my-nodejs-app-app (Deployment) cluster-sample (Cluster.postgresql.k8s.enterprisedb.io) None
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.
@kadel what's your opinion?
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.
If we decide to, I would prefer to make this change as part as another PR
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.
I agree it seems a bit confusing to display the local component/binding when requesting some other namespace (especially since the first line printed is Listing {ServiceBindings,resources} from the namespace "$ns"
).
But as discussed, it is okay to change this in a separate PR.
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.
LGTM feature-wise.
/approve
Added a few comments related to documentation.
[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 |
Co-authored-by: Armel Soro <[email protected]>
2e365c6
to
7315268
Compare
Thanks for your review @rm3l I approved the docs changes and rebased on master to fix the conflicts. |
SonarCloud Quality Gate failed.
|
/override ci/prow/v4.10-integration-e2e /override SonarCloud Code Analysis |
@feloy: Overrode contexts on behalf of feloy: SonarCloud Code Analysis, ci/prow/v4.10-integration-e2e 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. |
* Move "odo list" to "odo list component" * Refactor odo list component * Add --namespace flag to "odo list binding" * odo list implementation * Doc * Apply suggestions from code review Co-authored-by: Armel Soro <[email protected]> Co-authored-by: Armel Soro <[email protected]>
What type of PR is this:
/kind feature
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #5991
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: