Types of Validations
Note: This feature is only available in the Enterprise Plan.
The Validation Summary Panel tracks all validation issues that may arise from faults in the resource JSON configuration, serving as a central hub for identifying potential errors and broken references. By providing immediate visibility into these issues, the panel helps you quickly pinpoint errors, avoid release failures, and boost developer productivity.
What are the types of Validations?
Note: All validations have a severity of either Error
or Warning
. If any validation issues with "Error" severity are present, the release will not be triggered.
The following are the types of validations:
- REFERENCE_ERROR("Non-Existent Resource Reference"),
- DISABLED_RESOURCE_REFERENCE("Disabled Resource References"),
- INVALID_REFERENCE_EXPRESSION("Invalid Reference Expression"),
- SYNTAX_ERROR("Syntax Error"),
- GUARDRAILS_POLICY_ERROR("GuardRails Compliance Issues");
Non-Existent Resource Reference
This error occurs when a resource JSON refers to a resource that does not exist.
Example: This error occurs if the resource "new-test-service" referred to in the rules below does not exist.
{
"spec": {
"basicAuth": false,
"private": false,
"force_ssl_redirection": true,
"rules": {
"backend": {
"comment": "back-end",
"domain_prefix": "",
"path": "/api/employees/",
"port": "${service.new-test-service.out.interfaces.http.port}",
"service_name": "${service.new-test-service.out.interfaces.http.name}"
}
}
}
}
Disabled Resource Reference
This error occurs when a resource JSON refers to a resource that exists but is marked as disabled, meaning the resource JSON is trying to access a resource that is currently not available for use.
Example: This error occurs if the resource "new-test-service" referred to in the rules below is disabled.
{
"spec": {
"basicAuth": false,
"private": false,
"force_ssl_redirection": true,
"rules": {
"frontend": {
"comment": "front-end",
"domain_prefix": "",
"path": "/",
"port": "${service.new-test-service.out.interfaces.main.port}",
"service_name": "${service.new-test-service.out.interfaces.main.name}"
}
}
}
}
Invalid Reference Expression
This error occurs when a reference expression in a resource json is not correctly formed or refers to undefined variables, secrets, or artifacts. This could include syntax errors, incorrect usage of reference expressions, attempts to access non-existing variables, secrets, or artifacts, etc. This error is designed to catch issues with the structure and use of reference expressions in the resource json.
Example: This error occurs if the secret "non-existing-secret" referred to in the configuration is not present.
{
"env": {
"secret_for_prod": "${blueprint.self.secrets.non-existing-secret}"
}
}
Syntax Error
This error occurs when the resource JSON is invalid, often due to syntax issues like missing commas or incorrect formatting.
Example: In the below JSON file, there is a comma missing in line 2 after "VM". So we will see an error as shown in the image.
{
"flavor": "VM"
"metadata": {
"labels": {}
},
"kind": "service",
"disabled": true,
"provided": false,
"version": "0.11",
"spec": {}
}
Guardrails Policy Error
This error occurs when a defined guardrail policy is violated. Guardrail policies are set to enforce specific rules or standards, and any deviation from these can trigger this error.
Example: The file shown in the image is not adhering to the guardrails policy defined.
Updated 4 months ago