Skip to content

Job Status Feed

Overview

  • The UI maintains live job/deployment status via a legacy feed at /api/jobs/subscription.
  • Execution messages from /api/messages/subscribe currently lack job/worker identifiers, so the UI uses the legacy feed as the source of truth for badges until identifiers are added.

Current Wiring

  • Job Detail view subscribes and maps status per deployment: apps/lyftdata/ui/src/routes/jobs/[name]/+page.svelte.
  • Deployments view reuses the same mapping and store: apps/lyftdata/ui/src/routes/developer/deployments/+page.svelte.
  • Status card consumes a fallback label/variant and buffers rapid swaps to reduce flicker: apps/lyftdata/ui/src/lib/components/deployments/JobDeploymentStatusCard.svelte.

Endpoints

  • GET /api/jobs/subscription — legacy status stream that includes job and worker identifiers and status.
  • GET /api/messages/subscribe — execution telemetry (missing job/worker identifiers for now).

Troubleshooting

  • Status badges don’t update: verify the legacy subscription is open in DevTools Network tab and events stream regularly.
  • Mismatched job/worker: confirm mapping function derives a (job, worker) key and the legacy payload includes both.
  • Excessive flicker: the status card buffers swaps for ~500 ms; ensure timers are cleared on destroy and only one pending update exists.
  • No statuses for some deployments: check that the derived jobStatusByWorker map includes entries for all workers associated with the job.

Planned Improvements

  • Add job and worker identifiers to /api/messages/subscribe payload.
  • Update message watcher/tests to drive badges from telemetry without legacy fallback.
  • Remove the legacy feed dependency once parity is verified.