jfrog / nexus2artifactory

NexusToArtifactory - A tool designed to ease migration from Sonatype Nexus to JFrog Artifactory.
Apache License 2.0
67 stars 54 forks source link

Issue with "handle release/snapshot" option #27

Closed zonArt closed 6 years ago

zonArt commented 6 years ago

Hi,

There is a bug (regression) with the option "handles releases", "handles snapshots" and "check pom consistency". Whatever value you chose, the three boxes are ticked at repository creation on Artifactory.

This wasn't the case before.

Version of nexus2artifactory used: branch master at time of writing (commit ) Version of nexus used: Nexus Repository Manager OSS 2.14.3-02 Version of artifactory used: Artifactory Professional 5.8.3 rev 50803900

Thank you in advance for your help

zonArt commented 6 years ago

Forget me, sorry I haven't checked the "finalize" step on which these params are defined and was checking repos when migration was still ongoin. After reading the code, I noticed what's going on, sorry once again

DarthFennec commented 6 years ago

Yes, as you probably guessed, this is intentional. Originally, the migrator was setting these options during repository creation. This would cause a very common issue where artifacts would fail to migrate because they were rejected by these filters. To solve this problem, the migrator was changed to initially set these options to be as nonrestrictive as possible, and then reset them to the proper values once all artifacts have finished migrating.

zonArt commented 6 years ago

Issue is when your migration fails in between, the finalization is not done leaving the repo in inconsistent state (all boxes ticked)

DarthFennec commented 6 years ago

If artifacts fail to upload, or if some other migration failure occurs, the tool will just skip it and move on, so it should still run the finalize step.

If something goes really wrong and the tool crashes, there isn't much that can be done about it, outside of submitting an issue here. There's no way to ensure that finalize runs in this case, anyway.

On the other hand, if the user sends SIGINT in the middle of migration, it might be good to skip the rest of the artifacts, and then run finalize. Not sure about this one.