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. 2006-10-26-checksum-policy.patch
        8 kB
        Raphaël Luta
      2. MRM-212.patch
        7 kB
        Arnaud HERITIER

        Issue Links

          Activity

          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.
          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
          Arnaud HERITIER added a comment -

          applied in 0.9 branch

          Show
          Arnaud HERITIER added a comment - applied in 0.9 branch
          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
          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 -

          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).
          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/
          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 -

          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 !!
          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)
          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 -

          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.

            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