diff --git a/orchestrator/packages/common/src/validations/schemas/grading-job-config.ts b/orchestrator/packages/common/src/validations/schemas/grading-job-config.ts index 41f60633..b9d82622 100644 --- a/orchestrator/packages/common/src/validations/schemas/grading-job-config.ts +++ b/orchestrator/packages/common/src/validations/schemas/grading-job-config.ts @@ -18,7 +18,10 @@ const bashGradingScriptCommand = { on_complete: { anyOf: [ { - $ref: "https://orca-schemas.com/grading-job-config/grading-script-command", + type: "array", + items: { + $ref: "https://orca-schemas.com/grading-job-config/grading-script-command", + } }, { type: "string" }, { type: "number" }, @@ -27,7 +30,10 @@ const bashGradingScriptCommand = { on_fail: { anyOf: [ { - $ref: "https://orca-schemas.com/grading-job-config/grading-script-command", + type: "array", + items: { + $ref: "https://orca-schemas.com/grading-job-config/grading-script-command", + } }, { type: "string" }, { type: "number" }, diff --git a/orchestrator/packages/db/run-migration b/orchestrator/packages/db/run-migration index 87dc9ee8..1bbf15a8 100755 --- a/orchestrator/packages/db/run-migration +++ b/orchestrator/packages/db/run-migration @@ -8,7 +8,7 @@ fi migration_name="$1" container_name='postgres-migration' -docker run --rm -p 5432:5432 -v db-data:/var/lib/postgresql/data \ +docker run --rm -p 5434:5432 -v db-data:/var/lib/postgresql/data \ -e POSTGRES_PASSWORD=password --name "$container_name" -d postgres:10 > /dev/null if [[ $? -ne 0 ]]; then @@ -16,6 +16,6 @@ if [[ $? -ne 0 ]]; then exit 1 fi -export POSTGRES_URL=postgresql://postgres:password@localhost +export POSTGRES_URL=postgresql://postgres:password@localhost:5434 npx prisma migrate dev --name $1 docker stop "$container_name" > /dev/null