Skip to content

Conversation

@kaovilai
Copy link
Member

Implements a clean abstraction layer between udistribution and
distribution/distribution to reduce coupling and improve maintainability
when external dependencies are updated.

Key components:

  • pkg/registry/interface.go: Core Registry interface and config abstractions
  • pkg/registry/distribution/adapter.go: Distribution adapter implementation
  • pkg/registry/errors.go: Error abstraction layer
  • pkg/client/client_v2.go: New client using registry abstractions
  • pkg/client/client_v2_test.go: Comprehensive tests for new client
  • pkg/examples/abstraction_example.go: Usage examples

Benefits:

  • Version independence: Only adapter needs updates when distribution changes
  • Clean separation: Business logic separated from implementation details
  • Testability: Interface allows for mock implementations
  • Backward compatibility: Existing client.NewClient() continues to work
  • Error consistency: Unified error handling across the library

Migration path: New projects should use client.NewClientV2() while
existing code continues to work unchanged.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Implements a clean abstraction layer between udistribution and
distribution/distribution to reduce coupling and improve maintainability
when external dependencies are updated.

Key components:
- pkg/registry/interface.go: Core Registry interface and config abstractions
- pkg/registry/distribution/adapter.go: Distribution adapter implementation
- pkg/registry/errors.go: Error abstraction layer
- pkg/client/client_v2.go: New client using registry abstractions
- pkg/client/client_v2_test.go: Comprehensive tests for new client
- pkg/examples/abstraction_example.go: Usage examples

Benefits:
- Version independence: Only adapter needs updates when distribution changes
- Clean separation: Business logic separated from implementation details
- Testability: Interface allows for mock implementations
- Backward compatibility: Existing client.NewClient() continues to work
- Error consistency: Unified error handling across the library

Migration path: New projects should use client.NewClientV2() while
existing code continues to work unchanged.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@openshift-ci
Copy link

openshift-ci bot commented Jul 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kaovilai

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant