Skip to content

6.4.2.8 SourceAdapter

6.4.2.8.1 Purpose

A reader of one kind of source, for a range of its versions: the strategy the farm sync client or a parser uses for a given source. The client detects the source and its version, picks the active client adapter whose range covers that version, and records both on the sync run. Parsers choose their adapter the same way. Ranges of the active adapters of one channel never overlap, so a detected version always picks one adapter or none.

6.4.2.8.2 Questions it answers

  • Which adapter reads this source at this version?
  • Which source versions does a client release support?
  • Which adapters are deprecated or withdrawn?

6.4.2.8.3 Fields

Field Type Cardinality Description
id string (uuid) 1..1 Key.
code string 1..1 Stable name of the reader, e.g. delpro.sql, lely_horizon.export, sialleva.api.
side enum 1..1 Values: client, parser, puller.
puller: a reader of a vendor cloud that farm runs itself on a schedule, with the credential of the feed; it ships with farm, like a parser, and enters the same raw-file and commit path as a client.
source_channel SourceChannel 1..1 The kind of source it reads, e.g. the ManagementSoftwareChannel DelPro.
supported_versions string 1..1 The source versions the adapter was tested against when it was released, in the channel's own version scheme, e.g. "≥5.3, <6.0". A hint for staff when they map versions (AdapterMapping); it never selects the adapter by itself.
adapter_version string 1..1 Semantic version of the adapter; for side = parser it is the parser_version of the ParseJobs it runs (ParseJob.parser_version).
release Release 0..1 The first client release it was activated with; only for side = client. A record of where it came from: a Release belongs to one channel, so clients never compare with it.
build_number integer 0..1 The lowest build number of the farm sync client that carries it (ReleaseBuild.build_number); only for side = client. A client compares its own build number with it, on any channel.
status enum 1..1 Values: active, deprecated, withdrawn. Default: active.
system_version SystemVersion 1..1
created_at datetime 1..1
updated_at datetime 1..1

6.4.2.8.4 Relationships

References

Referenced by

Uses types

SystemVersion

6.4.2.8.5 Rules & constraints

  • A strategy that reads one kind of source: code and version of a reader built into a release.
  • Client adapters ship with the farm sync client and read the source at the farm; parser adapters ship with the parsers and turn raw files into canonical data. Which adapter reads which detected version is not built in: staff choose it remotely with an AdapterMapping, so a new source version that an existing strategy already reads needs no client update. The client reports what it detected (SourceDetection) and the adapter it used on the SyncRun (SyncRun.adapter, SyncRun.detection).
  • (code, adapter_version) is unique. A client release publishes the adapters it carries in its catalog (CapabilityCatalog), and they are registered here when the release is published.
  • The sync client offers a cloud vendor only for a ThirdPartyPlatformChannel that has an active puller mapping for the farm, global or of its Organization (AdapterMapping); it reads the list in its sync configuration.