Skip to content

[BUG] Exam agent API inconsistency #1122

Description

@QcFe

Describe the bug
During implementation of multi-environment templates, the InstanceAdapter specification used by the exam-agent changed, breaking Moodle compatibility.

This is the expected format:

type CustomizationUrls struct {
 ContentOrigin      string `json:"contentOrigin,omitempty"`
 ContentDestination string `json:"contentDestination,omitempty"`
 StatusCheck        string `json:"statusCheck,omitempty"`
}

type InstanceAdapter struct {
 ID                string            `json:"id"`
 Template          string            `json:"template"`
 Running           *bool             `json:"running,omitempty"`
 CustomizationUrls CustomizationUrls `json:"customizationUrls"`
 Phase             string            `json:"phase"`
 URL               string            `json:"url,omitempty"`
 Labels            map[string]string `json:"labels"`
}

Furthermore, now InstanceContentUrls are now mapped per-environment, so, InstanceSpecFromAdapter helper now needs to read the template referenced in the instance in order to retrieve the first environment ID (since now "default" is used, meaning the logic doesn't work if the environment is not called "default"), failing if the template contains more than an environment (which is unsupported by the exam-agent).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions