#1953: Complete cleanup commandlet implementation and review handover - #2230
Conversation
…p-commandlet-handover
- scan all global software repositories - detect used versions by resolved installation paths - support links to installation subfolders and nested extra tools - make cleanup discovery stateless - track project usage only on version level - reuse the global force mode for confirmation - add regression tests for used and unused installations
Coverage Report for CI Build 31014731240Coverage increased (+0.3%) to 72.861%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions28 previously-covered lines in 4 files lost coverage.
Coverage Stats💛 - Coveralls |
hohwille
left a comment
There was a problem hiding this comment.
We are closing the finishing line 👍
Still I found some points...
There was a problem hiding this comment.
Thanks for picking this up the substance of the #1957 review is addressed and the new tests cover exactly the cases that were requested there. I went through the branch and found a few points before this can go in, three of them blocking from my side:
- the new tests error out on Windows without symlink privileges (verified locally, 3 of 4 tests)
- the CHANGELOG entry landed in an already released section
- the confirmation cannot actually be skipped with
-falone
The remaining ones are smaller correctness and consistency points. I left out anything already covered by the review above (common super class for the model classes, delete flag only on version level, central findProjects()).
- add common abstract base class for installed software items - centralize software item name and path - rename cleanup model classes for reuse
- keep deletion state only on software versions - delete unused versions before empty parent folders - remove redundant deletion state from tools and editions
- add reusable project discovery to IdeContext - exclude non project folders centrally - reuse project discovery in cleanup and GUI
- scan default, Maven, and configured custom repositories explicitly - update cleanup test for the configured custom repository
Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
- add better help message - propagate user cancellation through the standard abort handling - correct software discovery variable names - report affected tools and editions accurately - cover batch force mode and Windows symlink restrictions - adjust CHANGELOG.adoc entry
quando632
left a comment
There was a problem hiding this comment.
All eight points from my previous review are addressed on dc95fdea. mvn -Dtest=CleanupCommandletTest test is green (5 tests, 3 skipped for missing symlink privileges), and checkstyle and spotless report no violations in the new files. Solving the counter problem by reporting "affected" tools and editions is nicer than what I suggested.
Two issues came out of the changes themselves, one of them blocking. Both only appear when the individual fixes are combined, so they are not visible in any single change.
…anupCommandlet.java Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
…anupCommandlet.java Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
hohwille
left a comment
There was a problem hiding this comment.
@Caylipp thanks for taking up this story and PR. 👍
I still have suggestions for improvement.
I hope you can address them tomorrow and I can merge the next day what would be awesome.
If you are running out of time, you may skip some "nice to haves" and I will create a cleanup issue and merge then. Thanks.
…anupCommandlet.java Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
- minor changes
- index installed versions by path - replace nested version lookup with map based lookup - preserve lookup for referenced subdirectories - centralize hierarchy updates through add methods - use a set for projects using a version
|
Build failed with: Seems to be #2242 - I restarted the build and hope we get a green run. |
|
Successfully tested with |
This PR fixes #1953
This PR completes and supersedes #1957 after the original author left the team.
Implemented changes:
-f/--forcemode instead of introducing a cleanup-specific force option.--force-deletehelp entries.commandlet.cleanuppackage._ide/software, includingdefault,maven, and custom repository IDs.Contents/MacOS.software/<tool>software/extra/<tool>software/extra/<tool>/<name>Testing instructions
Please add conscise, understandable instructions on how a reviewer can test/verify the functionality of your contribution here:
Related
Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internalChecklist for tool commandlets
Have you added a new
«tool»as commandlet? There are the following additional checks:«tool»«TOOL»_VERSIONand«TOOL»_EDITIONare honored by your commandlet