Issue Details (XML | Word | Printable)

Key: MRM-797
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Maria Odea Ching
Reporter: Arnaud Heritier
Votes: 7
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Archiva

Delete Released Snapshots doesn't work

Created: 06/May/08 06:53 AM   Updated: 26/May/08 03:44 AM   Resolved: 26/May/08 03:44 AM
Component/s: None
Affects Version/s: 1.0.2
Fix Version/s: 1.1

Time Tracking:
Not Specified

File Attachments: 1. XML File archiva.xml (5 kB)

Image Attachments:

1. after-repo-scan.png
(50 kB)

2. before-repo-scan.png
(50 kB)

3. screenshot-1.jpg
(56 kB)

4. screenshot-2.jpg
(51 kB)


 Description  « Hide

I have 2 repositories. One for releases and the other for snapshots.
I activated the option to remove snapshots for already released artifacts.
(I also setup the repository with purge by retention = 2 and purge by days older than = 15D)
In my snapshots repository I have always some old snapshots



Arnaud Heritier added a comment - 06/May/08 07:00 AM - edited

A sample of snapshots entries for artifacts already released


Arnaud Heritier added a comment - 06/May/08 07:02 AM

my snapshots repo configuration


Arnaud Heritier added a comment - 06/May/08 07:03 AM

My archiva configuration file


James William Dumay added a comment - 08/May/08 01:42 AM

Moving to 1.1.x


Arnaud Heritier added a comment - 08/May/08 02:39 PM

If this feature doesn't work and we can't fix it we could thnk to hide it in the UI and to remove it from the doc ???


James William Dumay added a comment - 08/May/08 06:51 PM

Moved back to 1.1 as this is a critical bug


Maria Odea Ching added a comment - 11/May/08 10:16 PM

I tried to replicate this issue, and below are the results. (Pls. see the images 'before-repo-scan.png' and 'after-repo-scan.png' I've attached to this issue.)
1. those snapshot versions with '-SNAPSHOT' that have been released already were deleted.
2. those snapshot versions with the timestamped were not released.

Is this the same for you Arnaud?
If so, I guess the issue here is case #2?


Arnaud Heritier added a comment - 12/May/08 02:11 PM

Hi Deng,

You just forgot to attach images
I'll check tomorrow. I have a virtual machin to reproduce it.


Maria Odea Ching added a comment - 12/May/08 09:10 PM

Oops.. sorry about that I'll attach them now.


Arnaud Heritier added a comment - 13/May/08 04:17 AM

I have two repositories in my case, and after an archiva cleanup
in snapshots repo I have :

total 184
 4 drwxr-xr-x 28 ubuntu ubuntu  4096 2008-05-05 13:47 .
 4 drwxr-xr-x 40 ubuntu ubuntu  4096 2008-05-05 13:48 ..
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.10.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.1.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.10-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.11.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.1.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.12-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.2.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.3.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.3.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.4.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.5.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.6.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.7.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.7.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.7.2-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.8.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 0.9.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.0-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.1-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.2-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.3-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.4-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 13:47 1.5-SNAPSHOT
 4 drwxr-xr-x  2 ubuntu ubuntu  4096 2008-05-05 15:08 1.6.0-SNAPSHOT
32 drwxr-xr-x  2 ubuntu ubuntu 32768 2008-05-05 15:07 1.7.0-SNAPSHOT
36 drwxr-xr-x  2 ubuntu ubuntu 36864 2008-05-13 10:43 1.8.0-SNAPSHOT
 4 -rwxr-xr-x  1 ubuntu ubuntu   367 2008-05-05 13:49 maven-metadata.xml
 4 -rwxr-xr-x  1 ubuntu ubuntu    52 2008-05-05 13:49 maven-metadata.xml.md5
 4 -rwxr-xr-x  1 ubuntu ubuntu    60 2008-05-05 13:49 maven-metadata.xml.sha1

in internal repo I have :

total 52
4 drwxr-xr-x 10 ubuntu ubuntu 4096 2008-05-05 16:44 .
4 drwxr-xr-x 21 ubuntu ubuntu 4096 2008-05-05 16:44 ..
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 0.9.0
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.0
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.1
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.3
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.4
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.5.0
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.5.1
4 drwxr-xr-x  2 ubuntu ubuntu 4096 2008-05-05 16:44 1.7.0
4 -rwxr-xr-x  1 ubuntu ubuntu  507 2008-05-05 17:00 maven-metadata.xml
4 -rwxr-xr-x  1 ubuntu ubuntu   52 2008-05-05 16:44 maven-metadata.xml.md5
4 -rwxr-xr-x  1 ubuntu ubuntu   60 2008-05-05 16:44 maven-metadata.xml.sha1

And in the web interface I have :

*  0.9.0/
    * 1.0/
    * 1.1/
    * 1.3/
    * 1.4/
    * 1.5.0/
    * 1.5.1/
    * 1.6.0-20080226.173346-10/
    * 1.6.0-20080229.103456-11/
    * 1.7.0/
    * 1.7.0-20080318.134105-23/
    * 1.7.0-20080318.151519-24/
    * 1.8.0-20080428.123142-29/
    * 1.8.0-20080429.102033-30/
    * 1.8.0-SNAPSHOT/
    * 1.7.0-SNAPSHOT/
    * 1.6.0-SNAPSHOT/

Snapshots directories not shown in the web interface contain only metadata files.
I just noticed that there's no release for 1.6.0, perhaps it is why 1.7.0-SNAPSHOTS weren't removed ?


Maria Odea Ching added a comment - 13/May/08 05:05 AM

Ah, the delete released snapshots feature only checks for released snapshots in that repo and not against other repositories that's why the snapshots are still in there.


Maria Odea Ching added a comment - 13/May/08 05:07 AM

Do you think we should support a 'delete released snapshots' against all the repos the user has access to?


Arnaud Heritier added a comment - 13/May/08 05:36 AM

Yes I think because I don't think it is a good practice to have repositories storing releases and snapshots at the same time. It's often the cause of problems.


Maria Odea Ching added a comment - 13/May/08 05:50 AM

Good point I'll make a draft on how I'll implement this and post it here or send it to the dev list.
Thanks Arnaud!


Maria Odea Ching added a comment - 14/May/08 01:55 AM

Maria Odea Ching added a comment - 26/May/08 03:44 AM

Fixed in trunk -r660126:

  • check for released versions of the snapshot across all repos
  • added test