Skip to content

Connector Registry model#2

Merged
tsutomi merged 6 commits into
mainfrom
connector-registry
Aug 5, 2025
Merged

Connector Registry model#2
tsutomi merged 6 commits into
mainfrom
connector-registry

Conversation

@tsutomi

@tsutomi tsutomi commented Aug 3, 2025

Copy link
Copy Markdown
Member

This pull request introduces new projects to the solution file and removes the README.md file, which previously detailed the framework's features, installation steps, and development guidelines.

Solution file updates:

  • Added Deveel.Messaging.Connectors project to the solution (Deveel.Messaging.Model.sln).
  • Added Deveel.Messaging.Connectors.XUnit test project to the solution (Deveel.Messaging.Model.sln).
  • Linked new projects to their respective solution folders (Deveel.Messaging.Model.sln).

Documentation changes:

  • Removed README.md, which contained framework details, motivation, installation steps, quick-start guides, and contribution information.

@tsutomi tsutomi requested a review from Copilot August 3, 2025 21:57
@tsutomi tsutomi added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 3, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive connector registry system for the messaging framework, providing attribute-driven connector registration and management capabilities. The changes include a new connector registry model, dependency injection integration, and enhanced schema validation, while refactoring existing validation methods into extension methods for better organization.

  • Addition of ChannelRegistry and IChannelRegistry for centralized connector management with automatic schema discovery
  • Implementation of ServiceCollectionExtensions for dependency injection integration and builder patterns
  • Creation of comprehensive test suites with 100% coverage scenarios for the new registry functionality

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Deveel.Messaging.Connectors/Deveel.Messaging.Connectors.csproj Project file defining .NET SDK project with dependencies
src/Deveel.Messaging.Connectors/Messaging/IChannelRegistry.cs Interface defining connector registry contract with registration and creation methods
src/Deveel.Messaging.Connectors/Messaging/ChannelRegistry.cs Core registry implementation with thread-safe connector management
src/Deveel.Messaging.Connectors/Messaging/ConnectorDescriptor.cs Descriptor class providing metadata about registered connectors
src/Deveel.Messaging.Connectors/Messaging/ChannelDescriptor.cs Channel descriptor with comprehensive channel metadata
src/Deveel.Messaging.Connectors/Messaging/ChannelSchemaAttribute.cs Attribute for marking connector classes with schema factories
src/Deveel.Messaging.Connectors/Messaging/ChannelRegistryBuilder.cs Builder pattern implementation for fluent connector registration
src/Deveel.Messaging.Connectors/Messaging/ServiceCollectionExtensions.cs Dependency injection extensions for registry configuration
test/Deveel.Messaging.Connectors.XUnit/Deveel.Messaging.Connectors.XUnit.csproj Test project configuration
test/Deveel.Messaging.Connectors.XUnit/Messaging/ChannelRegistryTests.cs Comprehensive test suite for registry functionality
test/Deveel.Messaging.Connectors.XUnit/Messaging/ChannelDescriptorTests.cs Test suite for connector descriptor functionality
test/Deveel.Messaging.Connector.Abstractions.XUnit/Messaging/ConnectionSettingsTests.cs Extensive test coverage for connection settings validation
src/Deveel.Messaging.Connector.Abstractions/Messaging/ChannelSchemaExtensions.cs Extension methods for schema validation and compatibility checking
src/Deveel.Messaging.Connector.Abstractions/Messaging/ChannelSchema.cs Refactored to remove validation methods (moved to extensions)
src/Deveel.Messaging.Connector.Abstractions/Messaging/MessagePropertyConfiguration.cs Removed fluent builder pattern implementation
docs/ValidateMessage-Usage-Examples.md Comprehensive documentation for message validation patterns
Comments suppressed due to low confidence (1)

test/Deveel.Messaging.Connectors.XUnit/Messaging/ChannelDescriptorTests.cs:309

  • The TestConnector class is an empty placeholder that doesn't implement IChannelConnector, which could lead to misleading test results when testing connector-related functionality.
		private class TestConnector

}

return validationResults;
}

Copilot AI Aug 3, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo in the error message: 'foe' should be 'for'.

Copilot uses AI. Check for mistakes.
/// <returns>True if the channel supports the endpoint type; otherwise, false.</returns>
public bool SupportsEndpointType(EndpointType endpointType)
{
return MasterSchema.Endpoints.Any(e => e.Type == endpointType || e.Type == EndpointType.Any);

Copilot AI Aug 3, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method checks for endpoint type compatibility but doesn't use the Matches method that exists on endpoint objects, which could lead to inconsistent behavior compared to other validation methods.

Suggested change
return MasterSchema.Endpoints.Any(e => e.Type == endpointType || e.Type == EndpointType.Any);
return MasterSchema.Endpoints.Any(e => e.Matches(endpointType));

Copilot uses AI. Check for mistakes.
Comment thread src/Deveel.Messaging.Connectors/Messaging/ChannelRegistry.cs Outdated
Comment thread src/Deveel.Messaging.Connectors/Messaging/ChannelSchemaAttribute.cs Outdated
@tsutomi tsutomi merged commit e8e3e15 into main Aug 5, 2025
6 checks passed
@tsutomi tsutomi deleted the connector-registry branch August 5, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants