Closed nmck257 closed 8 months ago
Would indeed be a nice improvement to catch & handle issues with downloading consistently, and "good" that you're in an environment that allows you that replicate that reliable already. Depending on the src/main change needed we maybe don't even have to replicate it with a test; I imagine it'll be adding an exception to a catch block somewhere.
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
Unit tests
What is the smallest, simplest way to reproduce the problem?
In my walled-garden network environment, several tests fail from
MavenPomDownloaderTest
, such asskipsLocalInvalidArtifactsEmptyJar
, with stack traces like this:What did you expect to see?
Happy test, or, perhaps an easy-to-read failure from being unable to connect to the default remote Maven repo in my environment.
What did you see instead?
The resultant exception is not wrapped into
MavenDownloadingException
and therefore does not give useful detail about the exact request/artifact that led to an error.So when this happens for real recipe runs, that lack of detail is really inconvenient.
What is the full stack trace of any errors you encountered?
Seen above
Are you interested in contributing a fix to OpenRewrite?
Yes, but, it's a little tricky because I know I'm in a non-standard network. I'd ideally like to define a unit test which simulates the "connect timeout" behavior, but, hard for me to know for sure that any given test will achieve that same behavior both in my network and in a "standard" network. I might have to spam Actions a little more than usual to validate that.