Skip to content

Add WorkerRun summary on metadata

Erwan Rouchet requested to merge metadata-workerrun-summary into master

Closes #1397 (closed)

I had some trouble finding where I was supposed to put the worker_run, and even started to have some concerns over whether some fields were properly read- or write-only, so I looked at the existing serializer structure:

@startuml
hide circle
hide empty members
MetaDataLightSerializer <|-- MetaDataSerializer
MetaDataSerializer <|-- MetaDataUpdateSerializer
MetaDataUpdateSerializer <|-- MetaDataCreateSerializer
MetaDataLightSerializer <|-- MetaDataBulkItemSerializer
MetaDataBulkSerializer --> MetaDataBulkItemSerializer
ElementListSerializer --> MetaDataLightSerializer
class MetadataEdit {
  RetrieveMetaData
  UpdateMetaData
  PartialUpdateMetaData
}
MetadataEdit --> MetaDataUpdateSerializer
class ElementMetadata {
  ListElementMetaData
  CreateMetaData
}
ElementMetadata --> MetaDataCreateSerializer
CreateMetaDataBulk --> MetaDataBulkSerializer
@enduml

This made me notice that the MetaDataSerializer is no longer used anymore, and can be merged with MetaDataUpdateSerializer, so I did the merge. The entity is now marked as nullable in OpenAPI as it should be, and the existing worker_run_id is now write-only. I looked around in code.vpn and did not find any use of a metadata worker_run_id returned by the API, so the breaking change caused by switching to worker_run.id has no impact.

Merge request reports

Loading