Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353767

Summary: MirrorRequest hides root cause of "Artifact not found"
Product: [Eclipse Project] Equinox Reporter: Tobias Oberlies <t-oberlies>
Component: p2Assignee: Tobias Oberlies <t-oberlies>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 3.7   
Target Milestone: Juno M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Tobias Oberlies CLA 2011-08-03 09:52:42 EDT
When mirroring artifacts from a composite repository, the retry logic in MirrorRequest.transfer together with the logic to avoid bad component repositories in CompositeArtifactRepository.getRawOrNormalArtifact leads to an error status created by the last line of getRawOrNormalArtifact instead of the status with the potential root cause when the component repository containing the descriptor was first asked (see [1]).

A solution to this issue would be to aggregate the statuses from the retries in MirrorRequest.transfer. Since this is a small thing, I'll probably implement this right away.


[1] Origin of the status with the potential root cause (Exception created through debugging):
java.lang.Exception
		at org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getRawOrNormalArtifact(CompositeArtifactRepository.java:367)
        at org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getRawArtifact(CompositeArtifactRepository.java:359)
        at org.eclipse.equinox.internal.p2.artifact.repository.RawMirrorRequest.getArtifact(RawMirrorRequest.java:79)
        at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transferSingle(MirrorRequest.java:235)
        at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transfer(MirrorRequest.java:191)
        at org.eclipse.equinox.internal.p2.artifact.repository.RawMirrorRequest.perform(RawMirrorRequest.java:47)
        at org.eclipse.equinox.p2.internal.repository.mirroring.Mirroring.downloadArtifact(Mirroring.java:199)
        at org.eclipse.equinox.p2.internal.repository.mirroring.Mirroring.mirror(Mirroring.java:154)
        at org.eclipse.equinox.p2.internal.repository.mirroring.Mirroring.run(Mirroring.java:105)
        at org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication.mirrorArtifacts(MirrorApplication.java:227)
        at org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication.run(MirrorApplication.java:188)
Comment 1 Tobias Oberlies CLA 2011-08-03 15:25:07 EDT
Done with aa82f55.

The fix also makes diagnosing mirror problems a bit easier because there is now a child status in the final status for each unsuccessfully contacted mirror.