Preserves AAS and Submodel service configurations#539
Merged
Conversation
…epository configuration preservation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances AasService and SubmodelService list retrieval by preserving repository authentication/settings when resolving descriptor endpoints and by adding structured warnings plus an optional strict failure mode for registry endpoint resolution.
Changes:
- Added structured warning reporting for registry descriptor endpoint resolution failures (and optional strict failure mode).
- Introduced helper logic to create endpoint-specific repository
Configurationobjects that preserve auth/middleware/settings from the primary repository configuration. - Expanded unit tests to cover auth configuration preservation, repository fallback with warnings, and strict failure behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/services/SubmodelService.ts | Adds warning collection + strict mode to getSubmodelList and preserves repository auth/settings for endpoint fetches via a helper configuration builder. |
| src/services/AasService.ts | Adds warning collection + strict mode to getAasList and preserves repository auth/settings for endpoint fetches via a helper configuration builder. |
| src/unit-tests/services/SubmodelService.test.ts | Adds unit tests for auth preservation, fallback-with-warnings, and strict failure for submodel list resolution. |
| src/unit-tests/services/AasService.test.ts | Adds unit tests for auth preservation, fallback-with-warnings, and strict failure for AAS list resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves error handling and configuration management in both the
AasServiceandSubmodelServiceclasses. The main enhancements include adding structured warning reporting for registry resolution issues, supporting a strict error mode, and ensuring that repository endpoint configurations consistently preserve authentication and settings.Error Handling and Warning Reporting
AasListResolutionWarningandSubmodelListResolutionWarninginterfaces to provide detailed warning information when registry endpoint resolution fails ingetAasListandgetSubmodelList. Warnings include error type, message, and relevant identifiers. [1] [2]getAasListandgetSubmodelListnow accept astrictRegistryResolutionoption. If enabled, the methods fail immediately with detailed error information if any registry endpoint cannot be resolved. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Configuration Management
createRepositoryEndpointConfigurationhelper methods in both services to create endpoint configurations that preserve authentication and middleware from the main repository configuration. This ensures consistent behavior when resolving AAS or Submodels from dynamic endpoints. [1] [2] [3] [4] [5]These changes make registry/repository resolution more robust and transparent, while also improving maintainability and consistency in endpoint configuration.
Closes #537