serverless-registry-api.handlers [DEBUG] received pull request event: ... SNIP ...
serverless-registry-api.handlers [DEBUG] started validate job for PR #46
serverless-registry-api.handlers [DEBUG] GET /health
serverless-registry-api.handlers [DEBUG] POST /apps/webhook
serverless-registry-api.job-runner.job.validate [ERROR] internal error when validating app "grpc-example": the "Resources" field failed the "required" validation tag
serverless-registry-api.job-runner.job.validate [ERROR] internal error when validating app "grpc-example": the "ParameterizedResources" field failed the "required" validation tag
serverless-registry-api.job-runner.job.validate [ERROR] internal error when validating app "grpc-example": the "Parameters" field failed the "required" validation tag
serverless-registry-api.job-runner.job.validate [ERROR] internal error when validating app "grpc-example": the "DeployScript" field failed the "required" validation tag
serverless-registry-api.handlers [DEBUG] GET /health
serverless-registry-api.job-runner [DEBUG] ran validate job
As we can see the App model fields related to deployment resources are all failing the required validation. These fields are never supposed to be empty. Because there is logic in parsing/repo.go which checks that all required files are present before reaching this code. Improve this logic.
Submitting a PR with a
deployment/
directory which is present but has no files in it results in an internal error response.Occurred on this PR: https://github.com/kscout/serverless-apps/pull/46#issuecomment-512842560
Logs from the server:
As we can see the
App
model fields related to deployment resources are all failing therequired
validation. These fields are never supposed to be empty. Because there is logic inparsing/repo.go
which checks that all required files are present before reaching this code. Improve this logic.