<#10377 fix: stop a Hub cache that cannot be writt...
# meltano-repo-activity
g
#10377 fix: stop a Hub cache that cannot be written or read failing the command Pull request opened by ReubenFrankel Description A command that fetches from Meltano Hub fails when the Hub cache cannot be written or read, although the fetch itself succeeds. This affects
meltano add
,
meltano lock
,
meltano hub list
,
meltano hub ping
, an install of a plugin that has no lock file, and the plugin update check. It happens on a read-only filesystem, or with a cache that another user owns, for example after
sudo meltano
. This has been true since
4.3.0
(#10333). Every Hub fetch writes the response to the user cache folder, and a fetch that accepts a cached copy reads it back. An
OSError
from either reached the command. The cache only saves a request, so a write or read that fails is now a warning, and the command fetches from the Hub as it would without a cache. •
_write_index_cache
catches
OSError
and logs it as a warning. •
_read_index_cache
catches
OSError
, logs it as a warning, and treats the cache as empty. • New tests fetch with a cache folder that cannot be made, and list with a cache file that cannot be read. They fail without the change. Checklist • I have read the contribution guide Was generative AI tooling used to co-author this PR? • Yes (please specify the tool below) Generated-by: Claude Code following the agentic coding guidelines Related Issues • None --- 🤖 Generated with Claude Code Summary by Sourcery Make Meltano Hub cache failures non-blocking so commands continue when cached responses are unavailable. Bug Fixes: • Prevent unreadable or unwritable Meltano Hub caches from causing Hub-dependent commands to fail by falling back to fetching from the Hub. Enhancements: • Log cache read and write failures as warnings while treating unavailable cached data as empty. Tests: • Add coverage for successful Hub fetches and listings when the cache cannot be written or read. meltano/meltano