Skip to content

Conversation

dfordivam
Copy link
Contributor

WIP branch with implementation for new scan-app endpoint /v0/events to provide data from mediator-scan API.

Fixes #1564

Pull Request Checklist

Cluster Testing

  • If a cluster test is required, comment /cluster_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a hard-migration test is required (from the latest release), comment /hdm_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.

PR Guidelines

  • Include any change that might be observable by our partners or affect their deployment in the release notes.
  • Specify fixed issues with Fixes #n, and mention issues worked on using #n
  • Include a screenshot for frontend-related PRs - see README or use your favorite screenshot tool

Merge Guidelines

  • Make the git commit message look sensible when squash-merging on GitHub (most likely: just copy your PR description).

@@ -0,0 +1,55 @@
-- Table 1: scan_verdict_store
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: I would remove the table 1: and table 2: from these comments


-- Index for efficient querying by migration, domain, and record time
create index scan_verdict_mi_di_rt on scan_verdict_store (migration_id, domain_id, record_time);
create index scan_verdict_di_mi_rt on scan_verdict_store (domain_id, migration_id, record_time);
Copy link
Contributor

Choose a reason for hiding this comment

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

in which case is this index needed, why does scan_verdict_mi_di_rt not suffice?

required: true
schema:
type: string
- name: "lossless"
Copy link
Contributor

@ray-roestenburg-da ray-roestenburg-da Aug 29, 2025

Choose a reason for hiding this comment

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

This should not be used (was part of a deprecated version of updates, /v0/updates), please follow example of /v2/updates/{update_id} instead

description: |
Returns the event with the given update_id.
parameters:
- name: "event_id"
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather use update_id, since event_id also has a meaning in this API, but is used for something else

)(extracted: TraceContext): Future[ScanResource.GetEventByIdResponse] = {
implicit val tc = extracted
withSpan(s"$workflowId.getEventById") { _ => _ =>
val encoding = if (lossless.getOrElse(false)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

do this like getUpdateByIdV2 instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose mediator-scan API through the Scan app
4 participants