Skip to content

Fix misleading error when cache isn't configured

Arran Walker requested to merge 3802-error-could-not-create-cache-adapter into main

What does this MR do?

  • Removes the "Cache config not defined. Skipping cache operation." warning. The cache operation is never actually skipped due to the adaptor/config not being present, it will just fall back to a non-distributed cache. There's already a warning in the cache extractor that tells you you're using a local cache if no distributed cache URL has been provided, so this warning here is mostly just noise.
  • Prevents the error cache factory not found: factory for cache adapter "" was not registered when the cache type is nil. This happens if [runners.cache] is present, but no type is specified. This again was confusing, so now if the cache adaptor is blank, it returns and therefore defaults to local caches only.

Why was this MR needed?

  • Removes noisy/unnecessary errors/warnings.
  • This error message is often mistaken as the underlying cause for some other problem. Removing this error line won't solve these problems, but it'll prevent confusion.

What's the best way to test this MR?

The tests have been updated to cover when a cache adaptor type is blank, the cache entry not present and a cache adaptor that doesn't exist that is non-nil.

What are the relevant issue numbers?

Closes #3802 (closed)

Merge request reports