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 delete component on podman with --name #6437

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Dec 22, 2022

What type of PR is this:

/kind feature

What does this PR do / why we need it:

odo delete component on podman with --name

Which issue(s) this PR fixes:

Fixes #6296

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

@netlify
Copy link

netlify bot commented Dec 22, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit 06e2f61
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/63a5b764a2b43800081d8f8e

@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 Dec 22, 2022
@feloy feloy changed the title Feature 6296/odo delete named component podman main odo delete component on podman with --name Dec 22, 2022
@feloy feloy removed the request for review from rnapoles-rh December 22, 2022 16:25
@odo-robot
Copy link

odo-robot bot commented Dec 22, 2022

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

@odo-robot
Copy link

odo-robot bot commented Dec 22, 2022

NoCluster Tests on commit b95cf66 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 22, 2022

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

@odo-robot
Copy link

odo-robot bot commented Dec 22, 2022

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

@odo-robot
Copy link

odo-robot bot commented Dec 22, 2022

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

@odo-robot
Copy link

odo-robot bot commented Dec 22, 2022

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

@feloy feloy force-pushed the feature-6296/odo-delete-named-component-podman-main branch from ccef060 to 86557b6 Compare December 22, 2022 22:38
Comment on lines 158 to 163
if len(podmanResources) > 0 {
log.Printf("The following pods and associated volumes will be deleted from podman:")
for _, pod := range podmanResources {
fmt.Printf("\t- %s\n", pod.GetName())
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you could modify printDevfileComponents to print podman resources as well so that the output is similar for both devfile and podman resources?

@@ -285,6 +319,7 @@ func (o *ComponentOptions) deleteDevfileComponent(ctx context.Context) error {
log.Warningf("Failed to delete the pod %q from podman: %s\n", pod.GetName(), err)
}
}
log.Infof("The component %q is successfully deleted from podman", o.name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
log.Infof("The component %q is successfully deleted from podman", o.name)
log.Infof("The component %q is successfully deleted from podman", componentName)

pkg/odo/cli/delete/component/component.go Show resolved Hide resolved
componentName, namespace string,
k8sResources []unstructured.Unstructured,
podmanResources []*corev1.Pod,
) {
log.Infof("This will delete %q from the namespace %q.", componentName, namespace)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you fix this message to also indicate podman if podmanResources are present?

@sonarcloud
Copy link

sonarcloud bot commented Dec 23, 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 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jan 2, 2023
@feloy
Copy link
Contributor Author

feloy commented Jan 2, 2023

/override ci/prow/v4.11-integration-e2e
Flaky e2e test

@openshift-ci
Copy link

openshift-ci bot commented Jan 2, 2023

@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.11-integration-e2e

In response to this:

/override ci/prow/v4.11-integration-e2e
Flaky e2e test

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-merge-robot openshift-merge-robot merged commit 451d810 into redhat-developer:main Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 delete component should be able to delete components running on podman
3 participants