Skip to content

Preserves AAS and Submodel service configurations#539

Merged
aaronzi merged 3 commits into
eclipse-basyx:mainfrom
aaronzi:main
May 20, 2026
Merged

Preserves AAS and Submodel service configurations#539
aaronzi merged 3 commits into
eclipse-basyx:mainfrom
aaronzi:main

Conversation

@aaronzi

@aaronzi aaronzi commented May 20, 2026

Copy link
Copy Markdown
Member

This pull request improves error handling and configuration management in both the AasService and SubmodelService classes. 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

  • Added AasListResolutionWarning and SubmodelListResolutionWarning interfaces to provide detailed warning information when registry endpoint resolution fails in getAasList and getSubmodelList. Warnings include error type, message, and relevant identifiers. [1] [2]
  • Both getAasList and getSubmodelList now accept a strictRegistryResolution option. 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]
  • When registry resolution yields warnings but no results, the warnings are passed along with the repository results if a repository fallback is used. [1] [2]

Configuration Management

  • Introduced createRepositoryEndpointConfiguration helper 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

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 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 Configuration objects 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.

Comment thread src/services/SubmodelService.ts Outdated
Comment thread src/services/SubmodelService.ts
Comment thread src/services/AasService.ts
@aaronzi aaronzi merged commit ac6e646 into eclipse-basyx:main May 20, 2026
4 checks passed
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.

Bug: empty configuration for AasService.getAasList()

2 participants