diff --git a/api/src/opentrons/cli/analyze.py b/api/src/opentrons/cli/analyze.py index 931025e15d7..9f5af67c584 100644 --- a/api/src/opentrons/cli/analyze.py +++ b/api/src/opentrons/cli/analyze.py @@ -140,7 +140,10 @@ class PythonConfig(BaseModel): class AnalyzeResults(BaseModel): - """Results of a protocol analysis.""" + """Results of a protocol analysis. + + See robot-server's analysis models for field documentation. + """ createdAt: datetime files: List[ProtocolFile] diff --git a/api/src/opentrons/protocol_engine/state/state_summary.py b/api/src/opentrons/protocol_engine/state/state_summary.py index 323a10af15a..c7185cc2c0d 100644 --- a/api/src/opentrons/protocol_engine/state/state_summary.py +++ b/api/src/opentrons/protocol_engine/state/state_summary.py @@ -18,6 +18,8 @@ class StateSummary(BaseModel): """Data from a protocol run.""" status: EngineStatus + # errors is a list for historical reasons. (This model needs to stay compatible with + # robot-server's database.) It shouldn't have more than 1 element. errors: List[ErrorOccurrence] labware: List[LoadedLabware] pipettes: List[LoadedPipette] diff --git a/robot-server/robot_server/maintenance_runs/maintenance_run_models.py b/robot-server/robot_server/maintenance_runs/maintenance_run_models.py index 8cde12588c2..f4d1a19dc61 100644 --- a/robot-server/robot_server/maintenance_runs/maintenance_run_models.py +++ b/robot-server/robot_server/maintenance_runs/maintenance_run_models.py @@ -76,7 +76,11 @@ class MaintenanceRun(ResourceModel): ) errors: List[ErrorOccurrence] = Field( ..., - description="Any errors that have occurred during the run.", + description=( + "The run's fatal error, if there was one." + " For historical reasons, this is an array," + " but it won't have more than one element." + ), ) pipettes: List[LoadedPipette] = Field( ..., diff --git a/robot-server/robot_server/protocols/analysis_models.py b/robot-server/robot_server/protocols/analysis_models.py index a8b188ff0a7..d31bb9f4eaa 100644 --- a/robot-server/robot_server/protocols/analysis_models.py +++ b/robot-server/robot_server/protocols/analysis_models.py @@ -108,7 +108,11 @@ class CompletedAnalysis(BaseModel): ) errors: List[ErrorOccurrence] = Field( ..., - description="Any errors the protocol run produced", + description=( + "The protocol's fatal error, if there was one." + " For historical reasons, this is an array," + " but it won't have more than one element." + ), ) liquids: List[Liquid] = Field( default_factory=list, diff --git a/robot-server/robot_server/runs/run_models.py b/robot-server/robot_server/runs/run_models.py index 485392cc9bc..7f435e054f0 100644 --- a/robot-server/robot_server/runs/run_models.py +++ b/robot-server/robot_server/runs/run_models.py @@ -77,7 +77,11 @@ class Run(ResourceModel): ) errors: List[ErrorOccurrence] = Field( ..., - description="Any errors that have occurred during the run.", + description=( + "The run's fatal error, if there was one." + " For historical reasons, this is an array," + " but it won't have more than one element." + ), ) pipettes: List[LoadedPipette] = Field( ...,