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

Improves odo delete for devfiles #2842

Merged

Conversation

mik-dass
Copy link
Contributor

@mik-dass mik-dass commented Apr 8, 2020

What type of PR is this?

/kind bug
/kind code-refactoring

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

It improves the odo delete command based on suggestions from #2763

Which issue(s) this PR fixes:

Fixes: NA

How to test changes / Special notes to the reviewer:

  • The CI is green
  • odo delete --all should also delete the odo-file-index.json file.
  • odo delete prompts should also display the component name

Copy link
Member

@dharmit dharmit left a comment

Choose a reason for hiding this comment

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

/lgtm

Thanks for addressing this @mik-dass

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Apr 8, 2020
@amitkrout
Copy link
Contributor

prow issue
/retest

@@ -210,6 +181,44 @@ func (do *DeleteOptions) Run() (err error) {
return
}

// Run has the logic to perform the required actions as part of command for devfiles
func (do *DeleteOptions) DevFileRun() (err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@mik-dass Any plan for writing UTs ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's the CLI package. We are testing CLI by using integration tests I guess.

Copy link
Contributor

Choose a reason for hiding this comment

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

Really i am in 50-50 state whether to write UTs for cli packages or not. Recently i saw UTs for few devfile cli packages, so thought why not then covering UTs for regular cli packages. More importantly our UTs coverage are being run on all regular cli packages having no test file.

Ping @girishramnani @kadel

Copy link
Contributor Author

@mik-dass mik-dass Apr 9, 2020

Choose a reason for hiding this comment

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

Recently i saw UTs for few devfile cli packages, so thought why not then covering UTs for regular cli packages.

TBH I couldn't any. Please share some links. Also is the effort even worth it?

Copy link
Contributor

@amitkrout amitkrout Apr 9, 2020

Choose a reason for hiding this comment

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

This is a generic topic for cabal discussion i guess. I will create a separate issue #2867 to tack the discussion of whether to add UTs for cli packages are sensible or not.

So atm i am applying lgtm label for your current changes
/lgtm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool thanks for creating the issue 👍

Copy link
Contributor

@amitkrout amitkrout Apr 11, 2020

Choose a reason for hiding this comment

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

TBH I couldn't any. Please share some links. Also is the effort even worth it?

Please refer #2867, there i have added the references.

@amitkrout
Copy link
Contributor

--now flag flake
/test v4.1-integration-e2e-benchmark

@codecov
Copy link

codecov bot commented Apr 11, 2020

Codecov Report

Merging #2842 into master will increase coverage by 0.10%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2842      +/-   ##
==========================================
+ Coverage   43.70%   43.81%   +0.10%     
==========================================
  Files         102      102              
  Lines        9160     9160              
==========================================
+ Hits         4003     4013      +10     
+ Misses       4780     4774       -6     
+ Partials      377      373       -4     
Impacted Files Coverage Δ
pkg/watch/watch.go 69.41% <0.00%> (+5.88%) ⬆️

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 3f49286...6662466. Read the comment docs.

@kadel
Copy link
Member

kadel commented Apr 14, 2020

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kadel

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 Apr 14, 2020
@openshift-bot
Copy link

/retest

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

8 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.

@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.

return err
}
err = do.EnvSpecificInfo.DeleteEnvDirIfEmpty()
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO, we should remove .odo folder also for odo delete --all, as --all signifies to delete all odo related data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@mik-dass mik-dass 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 15, 2020
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Apr 15, 2020
@adisky
Copy link
Contributor

adisky commented Apr 15, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Apr 15, 2020
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Apr 16, 2020
@adisky
Copy link
Contributor

adisky commented Apr 16, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Apr 16, 2020
@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 Apr 17, 2020
@openshift-bot
Copy link

/retest

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

7 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.

@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-merge-robot openshift-merge-robot merged commit 12801e0 into redhat-developer:master Apr 18, 2020
@mik-dass mik-dass deleted the dev_del_improve branch April 20, 2020 09:55
@rm3l rm3l added the area/refactoring Issues or PRs related to code refactoring label Jun 19, 2023
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. area/refactoring Issues or PRs related to code refactoring 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.

None yet

9 participants