-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
/area API
Describe the feature
When iterating on tests in reconciler/revision I noticed they take 10+ seconds to run. The main culprit seems to be TestResolve() which (via Resolve()) creates a k8schain to test resolving digests. Unfortunately this code iterates all the credential providers to auto-detect what to use and the ECR provider, at least on my computer, takes ages to fail :(.
Passing --tags disable_aws to disable that provider drops the test from seconds to milliseconds, but I doubt many people will guess to do this (and they shouldn't have to). There may be some other magic way to disable ECR from k8schain, but because it gets loaded implicitly via init if the file isn't excluded via build tags I couldn't find anything obvious.
An easy workaround for now may be to just move resolve*.go to its own subpackage, which is probably a worthwhile refactor anyway so I'll probably look at doing that if no-one hates the idea for any reason. Or maybe we should just disable the test in --short mode 🤷.