Skip to content

Update to Metamodel Version 3.2#327

Merged
aaronzi merged 46 commits into
eclipse-basyx:mainfrom
FriedJannik:upgrade/v3_2
Jun 3, 2026
Merged

Update to Metamodel Version 3.2#327
aaronzi merged 46 commits into
eclipse-basyx:mainfrom
FriedJannik:upgrade/v3_2

Conversation

@FriedJannik

Copy link
Copy Markdown
Member

Description of Changes

Please provide a brief summary of what you have changed in this pull request. Be clear and concise.

Related Issue

If this pull request is related to an existing issue, please link that issue using the format #issue_number.

BaSyx Configuration for Testing

Describe any specific configuration settings or environment setup required to test these changes effectively. If possible, please provide the BaSyx configuration as .zip file.

AAS Files Used for Testing

Please provide any AAS files that were used in the testing of these changes. Include a brief descriptions of their relevance to the changes being proposed.

Additional Information

Include any additional information or context that could be useful for the reviewer. This could include challenges faced, alternative solutions that were considered, etc.


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

@FriedJannik FriedJannik added the docker-snapshot PRs closed with this label build and push docker snapshot images label May 28, 2026
aaronzi added 9 commits May 28, 2026 15:28
- Added history configuration options via environment variables, including modes for history behavior (off, api, audit), retention days, immutability settings, and audit identity modes.
- Introduced ChangeEvent structure to encapsulate event data for history storage.
- Updated AppendVersionTx to append immutable event rows instead of updating existing history rows.
- Implemented SHA-256 hashing for canonical JSON snapshots and row hashes for history events.
- Added support for audit metadata in history events, including actor subject, request ID, and other contextual information.
- Created tests for history functionality, ensuring stable hashing and correct behavior under different configurations.
- Enhanced documentation to reflect new history features and configuration options.
@FriedJannik FriedJannik removed the docker-snapshot PRs closed with this label build and push docker snapshot images label May 29, 2026

@aaronzi aaronzi May 29, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The history tables should be in a different database in the same Postgres so that individual DB user rights can be configured.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We decided to not do this. The external anchor will archive this exact requirement. If users need that, the should use the external anchor.

Co-authored-by: Jannik Fried <Jannik.Fried@iese.fraunhofer.de>
Comment thread internal/common/history/history.go

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

Copilot reviewed 72 out of 76 changed files in this pull request and generated 5 comments.

Comment thread cmd/conceptdescriptionrepositoryservice/openapi.yaml Outdated
Comment thread pkg/submodelrepositoryapi/api_submodel_repository_api.go
Comment thread pkg/submodelrepositoryapi/api_submodel_repository_api.go
Comment thread pkg/submodelrepositoryapi/api_submodel_repository_api.go
Comment thread pkg/submodelrepositoryapi/api.go
@aaronzi aaronzi requested a review from Copilot June 1, 2026 18:38
@aaronzi aaronzi removed the docker-snapshot PRs closed with this label build and push docker snapshot images label Jun 1, 2026

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

Copilot reviewed 95 out of 99 changed files in this pull request and generated 2 comments.

@Martin187187

Copy link
Copy Markdown
Contributor

as a user i would expect that /$recent-changes sorts recent changes from latest to oldest. Currenlty it is sorted from oldest to latest. I assume that is specified in the standard?

@Martin187187

Martin187187 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Error removing Submodel Element!

Status: 500
Message Type: Error
Correlation ID: SMREPO-500-DeleteSubmodelElementByPathSubmodelRepo-InternalServerError-DeleteSubmodelElementByPath
Timestamp: 6/2/2026, 5:21:20 PM
Text: 500 Internal Server Error: SMREPO-DELSMEBPATH-UPDATEPATH-EXEC Failed to execute update path query: pq: duplicate key value violates unique constraint "uq_sibling_idshort" (23505)

How to reproduce:
I added a submodel element list with 50 items that dont have an idShort. Then i randomly started to delete some.
(dont know if those errors have anything to to with this PR)

@Martin187187

Copy link
Copy Markdown
Contributor

Error creating Submodel Element!

Status: 500
Message Type: Error
Correlation ID: SMREPO-500-PostSubmodelElementSubmodelRepo-InternalServerError-AddSubmodelElement
Timestamp: 6/2/2026, 5:32:54 PM
Text: 500 Internal Server Error: SMREPO-INSSME-INSTYPE-EXECQ pq: invalid input syntax for type json at column 80 (22P02)

To reproduce:

  • add AnnotatedRelationshipElement to a submodel

(dont know if those errors have anything to to with this PR)

@aaronzi

aaronzi commented Jun 3, 2026

Copy link
Copy Markdown
Member

as a user i would expect that /$recent-changes sorts recent changes from latest to oldest. Currenlty it is sorted from oldest to latest. I assume that is specified in the standard?

It's not defined in the spec as far as I can see. But agreed, it makes sense to sort from newest to oldest. Just forgot about that. The DB obviously stores it from oldest to newest in the append-only history tables.

@aaronzi aaronzi merged commit 70bcb25 into eclipse-basyx:main Jun 3, 2026
43 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.

4 participants