Open maggu2810 opened 9 years ago
database entries for hamcrest-core artifacts
mysql> select id,channel_id,type,parent,name,size,creation_ts from pd.ARTIFACTS where NAME LIKE '%hamcrest-core%'; +--------------------------------------+--------------------------------------+------+--------------------------------------+-----------------------+-------+---------------------+ | id | channel_id | type | parent | name | size | creation_ts | +--------------------------------------+--------------------------------------+------+--------------------------------------+-----------------------+-------+---------------------+ | 33358237-B099-49DD-A88C-340D75594484 | 09EF1289-54C1-4B9F-BE9B-F890EDE2481B | S | NULL | hamcrest-core-1.1.pom | 481 | 2015-03-18 09:48:27 | | 54904780-FD23-472E-8407-4742EC8AB886 | 09EF1289-54C1-4B9F-BE9B-F890EDE2481B | S | NULL | hamcrest-core-1.1.jar | 76643 | 2015-03-18 09:48:26 | | 58E44E13-DE38-4E0E-914A-EC330473D1C7 | 09EF1289-54C1-4B9F-BE9B-F890EDE2481B | A | 54904780-FD23-472E-8407-4742EC8AB886 | hamcrest-core-1.1.jar | 76643 | 2015-03-18 09:52:47 | | 7FFFA2F4-5972-4712-9CC0-EAB6490D1DCF | 09EF1289-54C1-4B9F-BE9B-F890EDE2481B | A | 33358237-B099-49DD-A88C-340D75594484 | hamcrest-core-1.1.pom | 481 | 2015-03-18 09:52:48 | +--------------------------------------+--------------------------------------+------+--------------------------------------+-----------------------+-------+---------------------+ 4 rows in set (0.00 sec)
Should we prevent the same "name" for the same "channel_id"? So create a constraint for artifacts for (channel_id,name) and replace the previous entry or if we need a new ID, delete the old one and then insert the new?
This is OK from the view of Package Drone. Each channel can have the same artifact multiple times.
If you like you can setup up the cleaner aspect with a maximum count of 1 (one), so that only the last artifact survives.
In the future there should be three ways to handle this (as @toshovski described somewhere else for the case of maven artifacts): a) ignore duplicates b) overwrite duplicates c) enforce (fail) when a duplicate is uploaded.
However this later channel policy is not yet implemented, since the detection of duplicates should not only be the name. The name should be one option.
I realized the cleaner yesterday. Good stuff. I just realized the multiple entries and did not know, that this is ok for package drone. In my situation this is also the same file (same MD5). But what should be happen if the files of the jar differs but the group id, artifact id and version keeps the same. Shouldn't the deploy fail or an update of the existing one be done?
If another pom contains a dependency using group id, artifact id and version which file package-drone will offer the maven client if I build this (the other) project?
Is this what you stated with your two last paragraphs?
Yes ;-)
I don't think you can make a general assumption on what people prefer (fail, update, ignore). So it should be a choice. At the moment, using the cleaner, it is possible to update & ignore .. failure is not an option :wink: (at least for now.
In the new validation part package-drone detects different artifacts with different md5sums but the same osgi-version. How can I suppress the deployment of such artifacts, but keep more than one (but limited count) of snapshot artifacts? If I group for osgi:version, the differrent snapshot-artifacts are handled as different versions, with group by mvn:version I also get multiple artifacts with the same osgi:version, but different md5sum (because of different attributes in manifest like build-time). May be an option would be to suppress artifacts, which fails the validation.
I used mvn deplo-file to deploy artifacts to a channel of my package-drone (0.4.0) instance. I called this multiple times (at least twice, don't know if it was started more often. The plain view / list shows multiple entries for the same name. URL: http://127.0.0.1:8080/channel/09EF1289-54C1-4B9F-BE9B-F890EDE2481B/viewPlain
Here a short excerpt: