Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-35611

Cleanup service task log shows wrong count for components deleted

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.38.1, 3.42.0
    • Fix Version/s: None
    • Component/s: Cleanup, Logging, Maven
    • Labels:
    • Notability:
      3
    • InvestmentLayer:
      support-escalated
    • Aha Concept:
      non-concept

      Description

      This could be a resurfacing of what was reported in NEXUS-20167, but it appears the changes cited in that jira were never actually merged.

      Reproduce

      1. Use UI upload to up a single jar with group id of com.example, artifact id example1 to maven-releases repo. Choose the option to automatically create a pom. This will result in 1 component, with 10 assets.
      2. Again, use UI upload to up a single jar to maven-releases repo with group id of com.example, artifact id example2. Choose the option to automatically create a pom. This will result in 2 components total, with 10 assets each.
      3. Create a cleanup policy with the following criteria:
      Format Maven, Asset name matcher ".example2."
      Confirm using preview this matches one component.
      4. Assign your new cleanup policy to maven-releases.
      5. Explicitly run the "Cleanup service" task.
      6. Review the cleanup policy task log. It includes the following INFO log messages:

      2022-10-05 11:14:52,808-0300 INFO  [quartz-11-thread-1]  *SYSTEM org.sonatype.nexus.cleanup.internal.content.service.CleanupServiceImpl - 10 components cleaned up for repository maven-releases in total
      2022-10-05 11:14:52,808-0300 INFO  [quartz-11-thread-1]  *SYSTEM org.sonatype.nexus.cleanup.internal.content.service.CleanupServiceImpl - 10 components cleaned up across all repositories
      

      These statements are wrong. In actual fact only one maven component was cleaned up, which consisted of 10 individual assets.

      Expected

      The log messages in the cleanup service task log which report how many components are deleted are accurate, per format. In the example case it should have only indicated it cleaned up 1 component, not 10.

       

      AC- Message should be specific about number of components and assets 

      ie There are 2 components with 6 and 4 assets respectively.  The message should be that there are 10 assets deleted and 2 components deleted 

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Michael Oliverio Michael Oliverio
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response:

                tigCommentSecurity.panel-title