Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
3780e2d
feat(sda-validator): WIP add sda-validator prototype with API(no auth…
KarlG-nbis Oct 7, 2025
cac598a
feat(sda-validator): move apptainer example directory
KarlG-nbis Oct 7, 2025
68dfd8d
feat(sda-validator): only allow getting the config variables, no dire…
KarlG-nbis Oct 8, 2025
6409520
feat(sda-validator): ensure internal/config library can handle config…
KarlG-nbis Oct 8, 2025
e2dccac
feat(sda-validator): split up code for readability and to reduce cogn…
KarlG-nbis Oct 8, 2025
b3df836
feat(sda-validator): fix import sorting
KarlG-nbis Oct 8, 2025
f1d6cdb
feat(sda-validator): remove leading slash in file paths in validation…
KarlG-nbis Oct 8, 2025
f179385
feat(sda-validator): add interface for executing os commands to allow…
KarlG-nbis Oct 8, 2025
554cf01
feat(sda-validator): add unit test for sda validator orchestrator api…
KarlG-nbis Oct 9, 2025
4da5d4b
feat(sda-validator): add a readme for apptainer example, and add a co…
KarlG-nbis Oct 10, 2025
2683ae6
feat(sda-validator): update docker file and kube resource example to …
KarlG-nbis Oct 13, 2025
f11119f
feat(sda-validator): update TestValidatePost and other unit test to work
KarlG-nbis Oct 13, 2025
4027e4a
feat(sda-validator): remove bash and sh from final image in dockerfile
KarlG-nbis Oct 13, 2025
e45525a
feat(sda-validator): use apptainer run instead of exec again, update …
KarlG-nbis Oct 13, 2025
d4d2758
feat(sda-validator): update to use --describe instead of describe whe…
KarlG-nbis Oct 14, 2025
ae14c5e
feat(k3d): fix reencryt host and port for k3d isolated
KarlG-nbis Oct 14, 2025
7a943f8
feat(sda-validator): add graceful shutdown of http server on terminat…
KarlG-nbis Oct 14, 2025
f3378b9
feat(sda-validator): add --net --network none options to apptainer ru…
KarlG-nbis Oct 20, 2025
8718f61
feat(sda-validator): create file to be validated with 0444 perm to on…
KarlG-nbis Oct 20, 2025
2a0346e
feat(sda-validator): allow for duplicate file paths in request
KarlG-nbis Oct 20, 2025
a2afa7c
feat(sda-validator-orchestrator): WIP add broker, database, http midd…
KarlG-nbis Oct 28, 2025
4bfe6ab
feat(rabbitmq): add queues for validator-orchestrator
KarlG-nbis Oct 28, 2025
0f4a26d
feat(sda-validator-orchestrator): update api unit tests
KarlG-nbis Oct 28, 2025
26c46fb
feat(sda-validator-orchestrator): add job preparation unit test, and …
KarlG-nbis Oct 29, 2025
23ea7ef
feat(sda-validator-orchestrator): add job worker unit tests
KarlG-nbis Oct 29, 2025
27c3b68
feat(sda-validator-orchestrator): add validators package unit tests
KarlG-nbis Oct 29, 2025
18059f0
feat(sda-validator): add another example validator: always success, a…
KarlG-nbis Oct 30, 2025
dacbdcb
feat(sda-validator-orchestrator): dont rely on viper string slice to …
KarlG-nbis Oct 30, 2025
6eaa881
feat(sda-validator-orchestrator): fix database readValidationResult m…
KarlG-nbis Oct 30, 2025
7e71026
feat(sda-validator-orchestrator): job preparation worker, check for n…
KarlG-nbis Oct 30, 2025
f852264
feat(sda-validator-orchestrator): add simple authenticator unit test,…
KarlG-nbis Oct 30, 2025
eff7f87
feat(sda-validator-orchestrator): add rbac unit tests
KarlG-nbis Oct 30, 2025
b752ae1
feat(sda-validator-orchestrator): remove X-Amz-Security-Token support…
KarlG-nbis Oct 30, 2025
c6a8dc8
feat(sda-validator-orchestrator): update and flesh out the README.md
KarlG-nbis Oct 30, 2025
33aeee4
feat(sda-validator-orchestrator): update the .kube example add a 2nd …
KarlG-nbis Oct 30, 2025
d71dc94
feat(sda-validator-orchestrator): fix linting issues
KarlG-nbis Oct 31, 2025
3bc6fd6
feat(sda-validator-orchestrator): fix some linting issues with amount…
KarlG-nbis Oct 31, 2025
04fb5b4
feat(sda-validator-orchestrator): refactor workers to not be singletons
KarlG-nbis Nov 3, 2025
dbe61f3
feat(sda-validator-orchestrator): update apptainer example README.md
KarlG-nbis Nov 3, 2025
5e3a600
feat(sda-validator-orchestrator): add kube secret example(without val…
KarlG-nbis Nov 3, 2025
3029219
feat(sda-validator-orchestrator): update dependencies
KarlG-nbis Nov 3, 2025
8d319ab
feat(sda-validator-orchestrator): update README.md add info about doc…
KarlG-nbis Nov 3, 2025
be894a3
feat(sda-validator-orchestrator): add flag for log.level to have in h…
KarlG-nbis Nov 4, 2025
244a59e
feat(sda-validator-orchestrator): fix result API not found case
KarlG-nbis Nov 4, 2025
0407b6b
feat(sda-validator-orchestrator): update readme.md, broker.close, jus…
KarlG-nbis Nov 4, 2025
56816c5
feat(sda-validator-orchestrator): fix potential nil pointer with read…
KarlG-nbis Nov 4, 2025
1aa6e17
feat(sda-validator-orchestrator): result API validate that validation…
KarlG-nbis Nov 4, 2025
6d58499
feat(sda-validator-orchestrator): update broker.ConnectionWatcher -> …
KarlG-nbis Nov 5, 2025
ffe9a73
feat(sda-validator-orchestrator): remove 01_create_db_and_schema.sql
KarlG-nbis Nov 10, 2025
81a6360
feat(sda-validator): fix mistake in rbac config flag, add more error …
KarlG-nbis Nov 13, 2025
b8ea4f7
feat(sda-validator-orchestrator): fix db message null values and null…
KarlG-nbis Nov 13, 2025
719ab8b
feat(sda-api): update /users/{userName}/files API to return Submissio…
KarlG-nbis Nov 19, 2025
94d98f6
feat(database): add unit test for new func SetSubmissionFileSize
KarlG-nbis Dec 4, 2025
8793114
feat(s3inbox): use SetSubmissionFileSize instead of direct query to d…
KarlG-nbis Dec 4, 2025
8d663dd
feat(api): fix TestAPIGetFiles_SubmissionFileSize unit test after mai…
KarlG-nbis Dec 4, 2025
f10acf9
feat(database): use time.Now().Nanosecond instead of rand to get a se…
KarlG-nbis Dec 4, 2025
10dffbb
feat(validator-orchestrator): update typos, etc, add support to host …
KarlG-nbis Dec 5, 2025
8954b48
feat(validator-orchestrator): fix linting issues with variable naming…
KarlG-nbis Dec 5, 2025
c64072e
feat(validator-orchestrator): fix some additional README.md typos
KarlG-nbis Dec 5, 2025
68e9b41
feat(validator-orchestrator): update validators unit test to reset st…
KarlG-nbis Dec 5, 2025
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
4 changes: 2 additions & 2 deletions .github/integration/scripts/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ global:
s3ReadyPath: "/minio/health/ready"
existingClaim: inbox-pvc
reencrypt:
host: reencrypt
port: 50443
host: pipeline-sda-svc-reencrypt
port: 50051
sync:
api:
password: "apiuser"
Expand Down
29 changes: 29 additions & 0 deletions rabbitmq/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,19 @@
"durable": true,
"auto_delete": false,
"arguments": {}
}, {
"name": "validation-job-queue",
"vhost": "sda",
"durable": true,
"auto_delete": false,
"arguments": {}
},
{
"name": "validation-job-preparation-queue",
"vhost": "sda",
"durable": true,
"auto_delete": false,
"arguments": {}
}
],
"exchanges": [
Expand Down Expand Up @@ -279,6 +292,22 @@
"arguments": {},
"destination": "catch_all.dead",
"routing_key": "#"
},
{
"source": "sda",
"vhost": "sda",
"destination_type": "queue",
"arguments": {},
"destination": "validation-job-queue",
"routing_key": "validation-job-queue"
},
{
"source": "sda",
"vhost": "sda",
"destination_type": "queue",
"arguments": {},
"destination": "validation-job-preparation-queue",
"routing_key": "validation-job-preparation-queue"
}
]
}
109 changes: 109 additions & 0 deletions sda-validator/apptainer-example/100-200_word_validator.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
BootStrap: docker
From: alpine:3.22

%post
apk add --no-cache jq bash

%environment
export LC_ALL=C

%runscript
#!/bin/bash
if [ "$1" != "--describe" ]; then

allPass=true
output='{
"files": ['

anyFiles=false

for k in $(jq '.files | keys | .[]' /mnt/input/input.json); do
anyFiles=true
value=$(jq -r ".files[$k]" /mnt/input/input.json);
path=$(jq -r '.path' <<< "$value");

if [ -f $path ]; then
wordCount=$(wc -w < $path)

if (($wordCount >= 100 && $wordCount <= 200)); then
output+="
{
\"path\": \"$path\",
\"result\": \"passed\"
},"
else

allPass=false

output+="
{
\"path\": \"$path\",
\"result\": \"failed\",
\"messages\": [
{
\"level\": \"error\",
\"time\": \"$(date +"%Y-%m-%dT%H:%M:%S%z")\",
\"message\": \"file has $wordCount words, which is not between 100 and 200\"
}
]
},"
fi
else

allPass=false

output+="
{
\"path\": \"$path\",
\"result\": \"failed\",
\"messages\": [
{
\"level\": \"error\",
\"time\": \"$(date +"%Y-%m-%dT%H:%M:%S%z")\",
\"message\": \"file does not exists\"
}
]
},"
fi
done

if [ $anyFiles = true ]; then
output=${output::-1}

if [ $allPass = true ]; then
output+="
],
\"result\": \"passed\"
}"
else
output+="
],
\"result\": \"failed\"
}"
fi
else
output+="
],
\"result\": \"failed\",
\"messages\": [
{
\"level\": \"error\",
\"time\": \"$(date +"%Y-%m-%dT%H:%M:%S%z")\",
\"message\": \"No files submitted to be validated\"
}
]
}"
fi

echo $output > /mnt/output/result.json

else
echo '{
"validatorId": "validator-word-count-100-200",
"name": "File word count validator",
"description": "Checks that the word count of a file is between 100 and 200 words",
"version": "1.0.0",
"mode": "file",
"pathSpecification": ["*"]
}'
fi
Binary file not shown.
11 changes: 11 additions & 0 deletions sda-validator/apptainer-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Apptainer examples
This contains 2 example [Apptainer](https://apptainer.org/) validators following the [Validator Framework Specification](https://github.com/GenomicDataInfrastructure/validation-framework/blob/main/validator-specification.md)

* [100-200 Word Validator](100-200_word_validator.def) validates that a file has between 100 and 200 words
* [Always Success Validator](always_success.def) always returns success("passed") on validations, unless no files are provided.

## Build and compile
```bash
apptainer build 100-200_word_validator.sif 100-200_word_validator.def
apptainer build always_success.sif always_success.def
```
90 changes: 90 additions & 0 deletions sda-validator/apptainer-example/always_success.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
BootStrap: docker
From: alpine:3.22

%post
apk add --no-cache jq bash

%environment
export LC_ALL=C

%runscript
#!/bin/bash
if [ "$1" != "--describe" ]; then

allPass=true
output='{
"files": ['

anyFiles=false

for k in $(jq '.files | keys | .[]' /mnt/input/input.json); do
anyFiles=true
value=$(jq -r ".files[$k]" /mnt/input/input.json);
path=$(jq -r '.path' <<< "$value");

if [ -f $path ]; then

output+="
{
\"path\": \"$path\",
\"result\": \"passed\"
},"
else

allPass=false

output+="
{
\"path\": \"$path\",
\"result\": \"failed\",
\"messages\": [
{
\"level\": \"error\",
\"time\": \"$(date +"%Y-%m-%dT%H:%M:%S%z")\",
\"message\": \"file does not exists\"
}
]
},"
fi
done

if [ $anyFiles = true ]; then
output=${output::-1}

if [ $allPass = true ]; then
output+="
],
\"result\": \"passed\"
}"
else
output+="
],
\"result\": \"failed\"
}"
fi
else
output+="
],
\"result\": \"failed\",
\"messages\": [
{
\"level\": \"error\",
\"time\": \"$(date +"%Y-%m-%dT%H:%M:%S%z")\",
\"message\": \"No files submitted to be validated\"
}
]
}"
fi

echo $output > /mnt/output/result.json

else
echo '{
"validatorId": "validator-always-success",
"name": "Always success validator",
"description": "Validator always succeed",
"version": "1.0.0",
"mode": "file",
"pathSpecification": ["*"]
}'
fi
Binary file not shown.
5 changes: 5 additions & 0 deletions sda-validator/orchestrator/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
swagger_v1.yml
README.md
.kube
Dockerfile
.dockerignore
14 changes: 14 additions & 0 deletions sda-validator/orchestrator/.kube/01_service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: sda-validator-orchestrator
labels:
app: sda-validator-orchestrator
spec:
ports:
- name: api
port: 8080
targetPort: api
protocol: TCP
selector:
app: sda-validator-orchestrator
40 changes: 40 additions & 0 deletions sda-validator/orchestrator/.kube/02_rbac_config_map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: sda-validator-orchestrator-rbac
data:
policy.json: |-
{
"policy": [
{
"role": "admin",
"path": "/admin/*",
"action": "(GET)|(POST)"
}, {
"role": "submission",
"path": "/validators",
"action": "GET"
}, {
"role": "submission",
"path": "/validate",
"action": "POST"
}, {
"role": "submission",
"path": "/result",
"action": "GET"
}
],
"roles": [
{
"role": "admin",
"rolebinding": "submission"
},
{
"role": "[email protected]",
"rolebinding": "admin"
}, {
"role": "[email protected]",
"rolebinding": "admin"
}
]
}
10 changes: 10 additions & 0 deletions sda-validator/orchestrator/.kube/03_secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: sda-validator-orchestrator
type: Opaque
stringData:
sdaApiToken: ""
brokerPassword: ""
pgPassword: ""

Loading
Loading