Archiva
  1. Archiva
  2. MRM-212

configure checksum policy for proxied repository

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0-alpha-1
    • Component/s: remote proxy
    • Labels:
      None
    • Flags:
      Patch

      Description

      Some artifact on repo1.maven.org have bad checksum. This need fix, but this also make archiva not usable as a replacement for maven-proxy.

      As maven itself allow to configure a checksum policy, a new configuration parameter on proxied repo would be nice.

      1. MRM-212.patch
        7 kB
        Arnaud HERITIER
      2. 2006-10-26-checksum-policy.patch
        8 kB
        Raphaël Luta

        Issue Links

          Activity

          nicolas de loof created issue -
          Hide
          Raphaël Luta added a comment -

          Here is a first attempt to add a configurable checksum policy.
          This patch file only contains model change and checksum verification.
          Not yet any configuration.

          Show
          Raphaël Luta added a comment - Here is a first attempt to add a configurable checksum policy. This patch file only contains model change and checksum verification. Not yet any configuration.
          Raphaël Luta made changes -
          Field Original Value New Value
          Attachment 2006-10-26-checksum-policy.patch [ 23669 ]
          Hide
          Jira Report User added a comment -

          Seems like a good start to me Raphael, and it doesn't seem to break anything.

          I'm not sure on the direction though - seems to me that after running the report I would want to then say "Now fix things", rather than have anything happen automatically. I'm not sure if automatic is the direction you're going.

          (I'm new to Archiva though, so not sure what the planned direction is on many things)

          Show
          Jira Report User added a comment - Seems like a good start to me Raphael, and it doesn't seem to break anything. I'm not sure on the direction though - seems to me that after running the report I would want to then say "Now fix things", rather than have anything happen automatically. I'm not sure if automatic is the direction you're going. (I'm new to Archiva though, so not sure what the planned direction is on many things)
          Hide
          Raphaël Luta added a comment -

          I must admit beeing new to archiva too.
          I only currently focus on the proxying aspect. (by hacking the archiva.xml configuration file)
          I have not yet played with the reports (nor really understand what their for)
          I also hav no idea on the way to configure by web (never used webwork myself)

          Show
          Raphaël Luta added a comment - I must admit beeing new to archiva too. I only currently focus on the proxying aspect. (by hacking the archiva.xml configuration file) I have not yet played with the reports (nor really understand what their for) I also hav no idea on the way to configure by web (never used webwork myself)
          Arnaud HERITIER made changes -
          Summary configure checksum policty for proxied repository configure checksum policy for proxied repository
          Hide
          Arnaud HERITIER added a comment -

          I added to your patch the web part to create/view/edit the checksum policy in proxied repositories.
          It's working fine !!

          Show
          Arnaud HERITIER added a comment - I added to your patch the web part to create/view/edit the checksum policy in proxied repositories. It's working fine !!
          Arnaud HERITIER made changes -
          Attachment MRM-212.patch [ 23817 ]
          Arnaud HERITIER made changes -
          Attachment MRM-212.patch [ 23817 ]
          Hide
          Arnaud HERITIER added a comment -

          I have a bug. I'm fixing it. I'll publish the patch just after ....

          Show
          Arnaud HERITIER added a comment - I have a bug. I'm fixing it. I'll publish the patch just after ....
          Hide
          Arnaud HERITIER added a comment -

          This patch includes the one from Raphaël but it fix the algorithm in DefaultProxyRequestHandler.checkChecksum(...) to fix some problems, and it updates web screens to view/edit the checksum policy for proxies.
          I'm annoyed because I had to change the test ProxyRequestHandlerTest. I had to set the GlobalChecksumPolicy of the ArtifactRepositoryFactory to CHECKSUM_POLICY_FAIL. I don't understand why I need to do it here, because it's the default checksum policy.
          Is there someone who can review this patch ?
          Do you think that we have to add some new tests ?
          For those who want to give a try to this fix (and to the one for MRM-211), I just uploaded a snapshot of the webapp here : http://people.apache.org/~aheritier/archiva/

          Show
          Arnaud HERITIER added a comment - This patch includes the one from Raphaël but it fix the algorithm in DefaultProxyRequestHandler.checkChecksum(...) to fix some problems, and it updates web screens to view/edit the checksum policy for proxies. I'm annoyed because I had to change the test ProxyRequestHandlerTest. I had to set the GlobalChecksumPolicy of the ArtifactRepositoryFactory to CHECKSUM_POLICY_FAIL. I don't understand why I need to do it here, because it's the default checksum policy. Is there someone who can review this patch ? Do you think that we have to add some new tests ? For those who want to give a try to this fix (and to the one for MRM-211 ), I just uploaded a snapshot of the webapp here : http://people.apache.org/~aheritier/archiva/
          Arnaud HERITIER made changes -
          Attachment MRM-212.patch [ 23827 ]
          Hide
          Arnaud HERITIER added a comment -

          It's very important to add this feature in archiva. Without it we can't use archiva as a proxy. There are too many checksum errors in m1 repositories (I'm not sure that it is the case with m2).

          Show
          Arnaud HERITIER added a comment - It's very important to add this feature in archiva. Without it we can't use archiva as a proxy. There are too many checksum errors in m1 repositories (I'm not sure that it is the case with m2).
          Arnaud HERITIER made changes -
          Priority Minor [ 4 ] Critical [ 2 ]
          Patch attached Yes
          Emmanuel Venisse made changes -
          Affects Version/s 1.0-beta-1 [ 12112 ]
          Emmanuel Venisse made changes -
          Affects Version/s 1.0-beta-1 [ 12112 ]
          Fix Version/s 1.0-beta-1 [ 12112 ]
          Wendy Smoak made changes -
          Link This issue is related to MRM-238 [ MRM-238 ]
          Hide
          Wendy Smoak added a comment -

          Archiva definitely needs this feature. Right now, it will not proxy the latest release of maven-gpg-plugin due to a bad checksum.

          We need to fix the bad checksums in central and make it stop happening-- is it the deploy plugin causing the problem?

          [ERROR] BUILD ERROR
          [INFO] ------------------------------------------------------------------------
          [INFO] Failed to resolve artifact.

          GroupId: org.apache.maven.plugins
          ArtifactId: maven-gpg-plugin
          Version: 1.0-alpha-3

          Reason: Unable to download the artifact from any repository

          org.apache.maven.plugins:maven-gpg-plugin:pom:1.0-alpha-3

          from the specified remote repositories:
          central (http://localhost:8080/archiva/repository/releases),
          ...

          From the log file:

          INFO | jvm 1 | 2007/03/10 10:23:52 | 2007-03-10 10:23:52,526 [SocketListener0-2] WARN ProxyRequestHandler - The checksum 'e4525958537d3b438ede7acb73bd10ba' did not match the remote value: D41D8CD98F00B204E9800998ECF8427E
          INFO | jvm 1 | 2007/03/10 10:23:52 | 2007-03-10 10:23:52,526 [SocketListener0-2] WARN ProxyRequestHandler - Skipping repository Central Repository: Checksum failures occurred while downloading org/apache/maven/plugins/maven-gpg-plugin/1.0-alpha-3/maven-gpg-plugin-1.0-alpha-3.pom

          Show
          Wendy Smoak added a comment - Archiva definitely needs this feature. Right now, it will not proxy the latest release of maven-gpg-plugin due to a bad checksum. We need to fix the bad checksums in central and make it stop happening-- is it the deploy plugin causing the problem? [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. GroupId: org.apache.maven.plugins ArtifactId: maven-gpg-plugin Version: 1.0-alpha-3 Reason: Unable to download the artifact from any repository org.apache.maven.plugins:maven-gpg-plugin:pom:1.0-alpha-3 from the specified remote repositories: central ( http://localhost:8080/archiva/repository/releases ), ... From the log file: INFO | jvm 1 | 2007/03/10 10:23:52 | 2007-03-10 10:23:52,526 [SocketListener0-2] WARN ProxyRequestHandler - The checksum 'e4525958537d3b438ede7acb73bd10ba' did not match the remote value: D41D8CD98F00B204E9800998ECF8427E INFO | jvm 1 | 2007/03/10 10:23:52 | 2007-03-10 10:23:52,526 [SocketListener0-2] WARN ProxyRequestHandler - Skipping repository Central Repository: Checksum failures occurred while downloading org/apache/maven/plugins/maven-gpg-plugin/1.0-alpha-3/maven-gpg-plugin-1.0-alpha-3.pom
          Hide
          Arnaud HERITIER added a comment -

          With the recent refactoring, we have xcertainly to review our patch. I'll try to do it in some days because I want to update my archiva release and I need this , I'll commit it directly to be sure that we'll not loose it.

          Show
          Arnaud HERITIER added a comment - With the recent refactoring, we have xcertainly to review our patch. I'll try to do it in some days because I want to update my archiva release and I need this , I'll commit it directly to be sure that we'll not loose it.
          Hide
          Arnaud HERITIER added a comment -

          applied in 0.9 branch

          Show
          Arnaud HERITIER added a comment - applied in 0.9 branch
          Wendy Smoak made changes -
          Fix Version/s 0.9 [ 13493 ]
          Hide
          Joakim Erdfelt added a comment -

          Archiva trunk has a post-download policy for checksums.

          Possible values for this policy.

          • FAIL - if a bad checksum is downloaded, consider the downloaded file to be bad, fail the attempt.
          • FIX - if a bad checksum is downloaded, report it, and fix it, returning the fixed checksum to the client.
          • IGNORE - do not check the checksum.
          Show
          Joakim Erdfelt added a comment - Archiva trunk has a post-download policy for checksums. Possible values for this policy. FAIL - if a bad checksum is downloaded, consider the downloaded file to be bad, fail the attempt. FIX - if a bad checksum is downloaded, report it, and fix it, returning the fixed checksum to the client. IGNORE - do not check the checksum.
          Hide
          Joakim Erdfelt added a comment -

          This improvement has been made on archiva trunk.

          Show
          Joakim Erdfelt added a comment - This improvement has been made on archiva trunk.
          Joakim Erdfelt made changes -
          Assignee Joakim Erdfelt [ joakime ]
          Fix Version/s 1.0 [ 12113 ]
          Fix Version/s 0.9 [ 13493 ]
          Fix Version/s 1.0-alpha-1 [ 13443 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:30:08 UTC 2015 [ 1428222608952 ]
          Mark Thomas made changes -
          Workflow jira [ 12707051 ] Default workflow, editable Closed status [ 12736510 ]
          Mark Thomas made changes -
          Patch attached Yes [ 10860 ]
          Flags Patch [ 10430 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:01:51 UTC 2015 [ 1428267711911 ]
          Mark Thomas made changes -
          Workflow jira [ 12944230 ] Default workflow, editable Closed status [ 12981361 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          214d 9h 55m 1 Joakim Erdfelt 25/May/07 15:06

            People

            • Assignee:
              Joakim Erdfelt
              Reporter:
              nicolas de loof
            • Votes:
              8 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development