Skip to content

Add analysis_types passthrough from Flotilla to SARA - #1133

Merged
aeshub merged 1 commit into
equinor:mainfrom
aeshub:add-analysis-types-passthrough
May 19, 2026
Merged

Add analysis_types passthrough from Flotilla to SARA#1133
aeshub merged 1 commit into
equinor:mainfrom
aeshub:add-analysis-types-passthrough

Conversation

@aeshub

@aeshub aeshub commented May 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Carry a per-inspection analysis_types list from Flotilla through ISAR to SARA, without ISAR inspecting the values. ISAR is a courier here; SARA validates.

  • StartMissionInspectionDefinition.analysis_types: list[str] | None is threaded onto every InspectionTask, copied to InspectionMetadata, and re-emitted as required_analysis on the MQTT InspectionResultPayload consumed by SARA. The list is also written to the metadata sidecar JSON.
  • Backward compatible in both directions: missions without the field produce null on the wire; SARA falls back to its existing default-analysis-by-file-extension behaviour.
  • Wire field uses snake_case to match the surrounding fields in the ISAR-facing serializer on Flotilla's side (inspection_target, inspection_description).

Related PRs

Tests

  • New parametrized test in `test_start_mission_definition.py` confirms the field defaults to `None` for all six inspection types.
  • Updated JSON fixture exercises the field end-to-end through `to_isar_mission`.
  • New uploader tests assert `required_analysis` round-trips to the published MQTT JSON for both populated and absent cases.

Drive-by

  • Fixed `StorageFake.store()` to return `StoragePaths` (previously returned `None`, violating the abstract interface) so the new uploader tests can reuse the shared mock.
  • Replaced fixed `time.sleep` waits in `tests/isar/storage/test_uploader.py` with a polling `_wait_until` helper where the assertion is on the presence of an event; cuts ~3s off the suite.

@aeshub aeshub added the improvement Improvement to existing functionality label May 17, 2026
@aeshub aeshub self-assigned this May 17, 2026
Carry per-inspection analysis selections from Flotilla through
ISAR to SARA without inspecting their semantics. The REST field
'analysisTypes' on each inspection definition is parsed into
InspectionTask.analysis_types, copied onto InspectionMetadata,
and re-emitted as 'required_analysis' on the MQTT inspection
result payload that SARA consumes. The same list is also written
to the metadata sidecar JSON uploaded alongside the blob.

Backward compatible in both directions: missions without the
field produce null on the wire, and SARA falls back to its
existing default-analysis-by-file-extension behaviour.

@Christdej Christdej left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aeshub
aeshub merged commit 6c0d63f into equinor:main May 19, 2026
4 checks passed
@aeshub
aeshub deleted the add-analysis-types-passthrough branch May 19, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants