You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve CopyBaseImages and HttpClient logging (#2071)
The `CopyBaseImages` job failed in build#2946397 with a timeout error.
Don't really know why. This PR improves logging in `CopyBaseImages`, the
HTTP `LoggingHandler`, and `OrasService.GetReferrersAsync` in an attempt
to figure out why.
Changes in this PR:
- **Fix OrasDotnetService auth cache concurrency bug**: Share a single
`Cache` instance across concurrent `GetReferrersAsync` calls instead of
creating one per call, prevents `InvalidOperationException` from
concurrent `Dictionary` mutations (I hit this locally).
- **Imporve HTTP logging**: `LoggingHandler` is now a
`DelegatingHandler` instead of a `MessageProcessingHandler` which allows
it to capture and log elapsed time and transport errors (including
timeouts).
- **Change HTTP logging to Debug level** and also set the default log
level to Debug.
- **Fix destination image name formatting** in CopyBaseImages logging.
- CopyBaseImages now does more things in dry-run mode.
- **Add `isDryRun` to `IOrasService.GetReferrersAsync`**: Skips registry
calls in dry-run mode to avoid rate limiting on unauthenticated
registries.
- **Consolidate import logging**: Single log message per image showing
destination, referrer count, source, and dry-run status
0 commit comments