Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,20 @@ pnpm test:engine --component aasx-file-server --url http://localhost:8087 --repo

### Report Behavior

- `console`: run summary plus failed checks and reasons.
- `json`: machine-readable report for workflow processing.
- `junit`: CI-compatible XML artifact.
- `markdown`: shareable summary document.
- `console`: run summary plus failed checks and reasons, including endpoint and response snippets when available.
- `json`: machine-readable report for workflow processing, including failure diagnostics such as request
method/endpoint, request body summary, response status, response body snippet, and trace source for integration-test
failures.
- `junit`: CI-compatible XML artifact; integration-test failure entries include endpoint and response context in the
failure message.
- `markdown`: shareable summary document with failure diagnostics and copyable cURL replay blocks for integration-test
failures.

Failure diagnostics are captured only in test-engine mode and are sanitized:

- Authorization and cookie-style headers are redacted.
- Large request/response bodies are truncated to compact snippets.
- Multipart/binary replay commands use real relative file names when available; otherwise placeholders are emitted.

Exit code behavior:

Expand Down
46 changes: 45 additions & 1 deletion ci/basyxschema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ CREATE TABLE IF NOT EXISTS aas_descriptor_endpoint (

CREATE TABLE IF NOT EXISTS aas_descriptor (
descriptor_id BIGINT PRIMARY KEY REFERENCES descriptor(id) ON DELETE CASCADE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
db_created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
asset_kind int,
asset_type VARCHAR(2048),
Expand Down Expand Up @@ -486,6 +487,19 @@ CREATE TABLE IF NOT EXISTS concept_description (
db_updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

-- ------------------------------------------
-- Schema compatibility upgrades
-- ------------------------------------------

ALTER TABLE IF EXISTS aas_descriptor
ADD COLUMN IF NOT EXISTS created_at TIMESTAMPTZ NOT NULL DEFAULT NOW();

ALTER TABLE IF EXISTS aas_identifier
ADD COLUMN IF NOT EXISTS db_created_at TIMESTAMPTZ NOT NULL DEFAULT NOW();

ALTER TABLE IF EXISTS aas_identifier
ADD COLUMN IF NOT EXISTS db_updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW();

/*
Auto-generated file. Do not edit manually.
Naming pattern: <context>_reference and <context>_reference_key.
Expand Down Expand Up @@ -668,6 +682,31 @@ CREATE TABLE IF NOT EXISTS submodel_descriptor_supplemental_semantic_id_referenc
db_updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

-- ------------------------------------------
-- AASX File Server
-- ------------------------------------------

CREATE TABLE IF NOT EXISTS aasx_package (
id BIGSERIAL PRIMARY KEY,
package_id TEXT NOT NULL UNIQUE,
file_oid OID NOT NULL,
file_name TEXT NOT NULL,
content_type TEXT NOT NULL DEFAULT 'application/asset-administration-shell-package',
db_created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
db_updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE TABLE IF NOT EXISTS aasx_package_aas_id (
id BIGSERIAL PRIMARY KEY,
package_db_id BIGINT NOT NULL REFERENCES aasx_package(id) ON DELETE CASCADE,
aas_id TEXT NOT NULL,
position INTEGER NOT NULL,
UNIQUE(package_db_id, position),
UNIQUE(package_db_id, aas_id),
db_created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
db_updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

-- ------------------------------------------
-- Timestamp triggers
-- ------------------------------------------
Expand Down Expand Up @@ -764,7 +803,6 @@ CREATE INDEX IF NOT EXISTS ix_operation_variable_operation_id ON operation_varia
CREATE INDEX IF NOT EXISTS ix_operation_variable_value_sme ON operation_variable(value_sme);

CREATE UNIQUE INDEX IF NOT EXISTS ix_aas_identifier_aasid ON aas_identifier(aasId);
CREATE INDEX IF NOT EXISTS ix_aas_identifier_db_created_at ON aas_identifier(db_created_at);

CREATE INDEX IF NOT EXISTS ix_specasset_descriptor_id_name ON specific_asset_id(descriptor_id, name);
CREATE INDEX IF NOT EXISTS ix_specasset_descriptor_id_position ON specific_asset_id(descriptor_id, position);
Expand All @@ -787,6 +825,7 @@ CREATE INDEX IF NOT EXISTS ix_aas_endpoint_descriptor_position ON aas_descriptor
CREATE INDEX IF NOT EXISTS ix_aas_endpoint_position ON aas_descriptor_endpoint(position);

CREATE INDEX IF NOT EXISTS ix_aasd_db_created_at ON aas_descriptor(db_created_at);
CREATE INDEX IF NOT EXISTS ix_aasd_created_at ON aas_descriptor(created_at);
CREATE INDEX IF NOT EXISTS ix_aasd_id_short ON aas_descriptor(id_short);
CREATE INDEX IF NOT EXISTS ix_aasd_global_asset_id ON aas_descriptor(global_asset_id);
CREATE INDEX IF NOT EXISTS ix_aasd_id_trgm ON aas_descriptor USING GIN (id gin_trgm_ops);
Expand Down Expand Up @@ -847,3 +886,8 @@ CREATE INDEX IF NOT EXISTS ix_specasset_supp_semantic_refkey_refid ON specific_a
CREATE INDEX IF NOT EXISTS ix_specasset_supp_semantic_refkey_refval ON specific_asset_id_supplemental_semantic_id_reference_key(reference_id, value);
CREATE INDEX IF NOT EXISTS ix_specasset_supp_semantic_refkey_type_val ON specific_asset_id_supplemental_semantic_id_reference_key(type, value);
CREATE INDEX IF NOT EXISTS ix_specasset_supp_semantic_refkey_val_trgm ON specific_asset_id_supplemental_semantic_id_reference_key USING GIN (value gin_trgm_ops);

CREATE INDEX IF NOT EXISTS ix_aasx_package_package_id ON aasx_package(package_id);
Comment thread
aaronzi marked this conversation as resolved.
CREATE INDEX IF NOT EXISTS ix_aasx_package_db_created_at ON aasx_package(db_created_at);
CREATE INDEX IF NOT EXISTS ix_aasx_package_aas_id_aas ON aasx_package_aas_id(aas_id);
CREATE INDEX IF NOT EXISTS ix_aasx_package_aas_id_package ON aasx_package_aas_id(package_db_id);
Comment thread
aaronzi marked this conversation as resolved.
24 changes: 19 additions & 5 deletions ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,30 @@ services:

# AASX File Server
aasx-file-server:
image: eclipsebasyx/aasxfileserver:2.0.0-milestone-08
image: eclipsebasyx/aasxfileserver-go:SNAPSHOT
container_name: aasx-file-server
command: ["/app/aasxfileserver"]
ports:
- '8087:8081'
environment:
# Service Configuration
SERVER_PORT: 8081
BASYX_BACKEND: "InMemory"
BASYX_CORS_ALLOWED_ORIGINS: "*"
BASYX_CORS_ALLOWED_METHODS: "GET, POST, PATCH, DELETE, PUT, OPTIONS, HEAD"
- SERVER_PORT=8081
- CORS_ALLOWEDORIGINS=*
- CORS_ALLOWEDHEADERS=*
- CORS_ALLOWEDCREDENTIALS=true
- CORS_ALLOWEDMETHODS=GET,POST,PUT,PATCH,DELETE,OPTIONS
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin123
- POSTGRES_DBNAME=basyxTestDB
- POSTGRES_MAXOPENCONNECTIONS=500
- POSTGRES_MAXIDLECONNECTIONS=500
- POSTGRES_CONNMAXLIFETIMEMINUTES=5
- ABAC_ENABLED=false
depends_on:
db-schema-init:
condition: service_completed_successfully

# PostgreSQL database
db:
Expand Down
Loading
Loading