Skip to content

Conversation

@potapovkd
Copy link

@potapovkd potapovkd commented Nov 9, 2025

…cross various storage adapters

Closes #9614

Change Description

Remove unused Adapter.Remove method from the block adapter interface and all its implementations.

Background

The Remove method in the block adapter interface was not being used anywhere in the codebase except in tests. As mentioned in issue #9614, this makes issue #6836 (which was about optimizing the S3 Remove implementation with wait/verify logic) meaningless since the method is never actually called in production code.

This PR removes:

  • The Remove method from the Adapter interface
  • All implementations across adapters (S3, GCS, Azure, Local, Memory, Transient)
  • The metrics wrapper for the Remove method
  • The test function testAdapterRemove

This simplifies the codebase and removes approximately ~230 lines of dead code, including the expensive waiter.Wait operation in the S3 adapter that was waiting for object deletion confirmation.

Bug Fix

N/A - This is a tech debt cleanup, not a bug fix.

New Feature

N/A - This PR removes code rather than adding new features.

Testing Details

  1. Verified that Remove method is not called anywhere in production code using grep searches
  2. Confirmed successful compilation of all block adapter packages
  3. Verified no linter errors after changes
  4. The only references to Remove were in test code, which has been appropriately removed

Breaking Change?

Technically yes - this removes a public method from the Adapter interface. However, the method was not used anywhere in the actual codebase (only in tests), so there should be no practical impact on existing functionality.

Impact:

  • ✅ API: Method removed from interface (unused in practice)
  • ✅ CLI: No impact
  • ✅ Clients: No impact (method was not exposed to clients)

Additional info

Files modified:

  • pkg/block/adapter.go - removed method from interface
  • pkg/block/s3/adapter.go - removed S3 implementation
  • pkg/block/gs/adapter.go - removed GCS implementation
  • pkg/block/azure/adapter.go - removed Azure implementation
  • pkg/block/local/adapter.go - removed local filesystem implementation
  • pkg/block/mem/adapter.go - removed in-memory implementation
  • pkg/block/transient/adapter.go - removed transient implementation
  • pkg/block/metrics.go - removed metrics wrapper
  • pkg/block/blocktest/basic_suite.go - removed test and unused import

Contact Details

[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove ".../block".Adapter.Remove

1 participant