Uploaded image for project: 'Maven Build Cache Extension'
  1. Maven Build Cache Extension
  2. MBUILDCACHE-32

Do not print exception when probing builds in remote repo

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1.0
    • None

    Description

      When cache engine tries to discover existing cache by checksum, it sends get request. 
      This request is normally getting 404s, because cache is not guaranteed to exist.
      It's a normal situation and exception should not be printed in such case as it meaninglessly pollutes logs:

      org.apache.maven.wagon.ResourceDoesNotExistException: resource missing at https://my-cache/.../buildinfo.xml, status: 404 Not Found
          at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.fillInputData (AbstractHttpClientWagon.java:1191)
          at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.fillInputData (AbstractHttpClientWagon.java:1140)
          at org.apache.maven.wagon.StreamWagon.getInputStream (StreamWagon.java:126)
          at org.apache.maven.wagon.StreamWagon.getIfNewerToStream (StreamWagon.java:226)
          at org.apache.maven.wagon.StreamWagon.getToStream (StreamWagon.java:262)
          at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run (WagonTransporter.java:533)
          at org.eclipse.aether.transport.wagon.WagonTransporter.execute (WagonTransporter.java:425)
          at org.eclipse.aether.transport.wagon.WagonTransporter.get (WagonTransporter.java:400)
          at org.apache.maven.buildcache.RemoteCacheRepositoryImpl.getResourceContent (RemoteCacheRepositoryImpl.java:165)
          at org.apache.maven.buildcache.RemoteCacheRepositoryImpl.findBuild (RemoteCacheRepositoryImpl.java:114)
          at org.apache.maven.buildcache.LocalCacheRepositoryImpl.findBuild (LocalCacheRepositoryImpl.java:183)
          at org.apache.maven.buildcache.CacheControllerImpl.findCachedBuild (CacheControllerImpl.java:212)
          at org.apache.maven.buildcache.CacheControllerImpl.findCachedBuild (CacheControllerImpl.java:179)
          at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute (BuildCacheMojosExecutionStrategy.java:114)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:179)
       

      Need to create method similar to RemoteCacheRepositoryImpl#getResourceContent, but getResourceContentQuiet and use it when probing buildinfo.xml. the method should not log exceptions

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            olamy Olivier Lamy
            alex_ashitkin Alexander Ashitkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment