Skip to content

Fix AAS registry descriptor synchronization#1034

Merged
aaronzi merged 2 commits into
eclipse-basyx:mainfrom
aaronzi:agent/fix-registry-descriptor-sync
Jul 19, 2026
Merged

Fix AAS registry descriptor synchronization#1034
aaronzi merged 2 commits into
eclipse-basyx:mainfrom
aaronzi:agent/fix-registry-descriptor-sync

Conversation

@aaronzi

@aaronzi aaronzi commented Jul 19, 2026

Copy link
Copy Markdown
Member

Pull Request Template

Description of Changes

The registry integration created and deleted AAS descriptors, but it did not keep them in sync when an AAS or its Asset Information was updated. This change updates the descriptor after both operations and retains existing Submodel Descriptors and Registry-managed endpoint metadata.

Mutations for the same AAS are serialized within one repository instance so that concurrent updates, rollbacks, deletes, and Submodel reference changes cannot overtake each other. If a Registry PUT returns an ambiguous error, the integration reads the descriptor back and only rolls the repository back when the requested AAS-derived state is not present.

Registry deletion now calls DELETE directly, treats only 404 as already absent, and keeps the local AAS for every other Registry failure. Link and unlink errors include the operation, HTTP status, and response body.

The feature documentation now lists the required Registry permissions: CREATE for creation, READ and UPDATE for synchronization, and DELETE for deletion.

Related Issue

Closes #998
Closes #1016
Closes #927

BaSyx Configuration for Testing

No special configuration is required for the unit tests. They use the in-memory backend and a mocked Registry client.

The service-backed integration tests use the existing regintegration, multiurl, and authregistry profiles with their corresponding Registry and Keycloak services.

AAS Files Used for Testing

The existing AasSimple_1.json fixture is used by the HTTP integration tests. The unit tests create their AAS instances programmatically.

Additional Information

The fix was implemented test-first. Regression tests cover descriptor updates, rollback behavior, concurrent same-instance mutations, ambiguous PUT responses, endpoint and Submodel Descriptor preservation, detailed create/delete errors, and Registry permission failures.

The Registry API currently has no conditional PUT or partial Shell Descriptor update. Direct descriptor changes by another Registry client therefore must not run concurrently with an AAS update if both changes need to be retained.

Validation performed:

  • mvn -pl basyx.common/basyx.core test
  • mvn -pl basyx.aasrepository/basyx.aasrepository-feature-registry-integration -Dtest=RegistryIntegrationAasRepositoryTest,AasRepositoryRegistryLinkDescriptorGenerationTest test
  • mvn -pl basyx.aasrepository/basyx.aasrepository-feature-registry-integration -am -DskipTests package

The full service-backed module suite was also attempted locally. Its external-service cases could not run because the Registry and Keycloak test services were not available.


Please ensure that you have tested your changes thoroughly before submitting the pull request.

Signed-off-by: Aaron Zielstorff <aaron.zielstorff@iese.fraunhofer.de>
@aaronzi
aaronzi marked this pull request as ready for review July 19, 2026 14:16
Signed-off-by: Aaron Zielstorff <aaron.zielstorff@iese.fraunhofer.de>
@aaronzi
aaronzi merged commit cd90e46 into eclipse-basyx:main Jul 19, 2026
45 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

1 participant