Skip to main content

Registry

The registry provides access to metadata about available evaluation stacks. It retrieves environments from one of the following data providers, which can be configured through the EVA_REGISTRY_PROVIDER environment variable:

  • local: The registry extracts all environments that are available as images in the local Docker installation.
  • gitlab: The registry connects to the container registry of a GitLab installation and retrieves environments from the available images. To use this provider, the base URLs of the GitLab instance and its container registry must be specified using EVA_REGISTRY_GITLAB_URL and EVA_REGISTRY_GITLAB_DOCKER_REGISTRY_URL. Since a GitLab container registry is associated with a specific project, the corresponding project ID must also be provided. This ID can be found on the project's main page below the project name and is configured through EVA_REGISTRY_GITLAB_PROJECT_ID. If the project's container registry is private, an access token with the read_registry scope must be generated for the project and configured using the EVA_REGISTRY_GITLAB_USER and EVA_REGISTRY_GITLAB_TOKEN variables.

Environments are cached by the registry for a configurable period of time. This reduces the need to contact the underlying data provider for every request and improves response times. However, as a consequence, newly added environments or changes to existing metadata may not become visible immediately. The cache lifetime (TTL) can be configured using the EVA_REGISTRY_CACHE_TTL variable and is specified in seconds. A value of -1 disables cache expiration, resulting in an infinite TTL. The cache can be disabled by setting EVA_REGISTRY_CACHE_TTL=0.

Evaluators are obtained statically through the EvaluatorRegistry class.

Endpoints

The registry has an HTTP interface that accepts requests on port 7777.

GET /stacks

Returns all evaluation stacks that are available.

EvaluatorsResponse: {
stacks: EvaluationStack[],
last_update: string
}
  • evaluators: Available evaluation stacks with metadata
  • last_update: String in ISO8601 format indicating when the last update was performed by the data provider.
EvaluationStack: {
environment: string
evaluator: EvaluatorDeclaration
ref: string
}
  • environment: ID of the environment
  • evaluator: Metadata about the evaluator
  • ref: Selector
EvaluatorDeclaration: {
id: string
capability: EvaluatorCapability {
compile: bool
test: bool,
coverage: bool,
style: bool
}
supported_envs: string[]
excluded_envs: string[]
default_env: string[]
}

GET /stacks/<ref>

Looks up the evaluation stack by the given selector ref and returns the metadata, if available. If no matching stack can be found, the endpoint returns an HTTP 404 status code.

GetStackResponse: {
stack: EvaluationStack,
last_update: string
}