Skip to content

[BE][FE] feat: Add Feishu (Lark) as native alert destination#7320

Open
rusherman wants to merge 6 commits into
comet-ml:mainfrom
rusherman:feat/feishu-alert-destination
Open

[BE][FE] feat: Add Feishu (Lark) as native alert destination#7320
rusherman wants to merge 6 commits into
comet-ml:mainfrom
rusherman:feat/feishu-alert-destination

Conversation

@rusherman

Copy link
Copy Markdown

Summary

Re-opens the Feishu (Lark) native alert destination from #5775 (closed inadvertently on the maintainers' side), rebased onto the latest main and reworked to address all 7 automated review comments from the original PR.

Feishu becomes the 4th native destination alongside General / Slack / PagerDuty, delivering alerts as interactive cards to a group chat via a custom bot webhook.

Structured as 3 reviewable commits

  1. refactor: extract AlertWebhookUtils (shared formatWindowDuration, formatEventType, resolveBaseUrl) and switch SlackWebhookPayloadMapper to use it — no behavior change.
  2. feat: Feishu mapper/models, AlertType.FEISHU, adapter case, migration, frontend, tests.
  3. chore: sync OpenAPI spec, Python/TypeScript SDKs and docs for the new enum value.

Addressing the original review

Finding Resolution
metadata/metadataUrl NPE resolveBaseUrl normalizes null/blank via Optional
OpenAPI/SDK not regenerated spec + Python + TypeScript (incl. serialization) + docs updated
Broad catch (Exception) kept as an intentional per-payload fallback, now documented
Non-reversible ENUM rollback migration marked forward-only with a remediation note
Duplicated formatWindowDuration extracted to AlertWebhookUtils
Duplicated formatEventType extracted to AlertWebhookUtils
FE mapping overwrote the title prefix Feishu uses an empty field-mapping; the title is built server-side

Testing

  • Backend: FeishuWebhookPayloadMapperTest (36 cases) green; spotless:check clean
  • Frontend: npm run build passes (v1 + v2)
  • SDK enum values synced across Python & TypeScript (including the serialization layer)

Demo

https://www.youtube.com/watch?v=yE7wB1xJXLA

@rusherman
rusherman requested review from a team as code owners July 2, 2026 10:40
@github-actions github-actions Bot added documentation Improvements or additions to documentation python Pull requests that update Python code java Pull requests that update Java code Frontend Backend tests Including test files, or tests related like configuration. typescript *.ts *.tsx Python SDK TypeScript SDK labels Jul 2, 2026
Comment thread apps/opik-frontend/src/v1/pages/AlertsPage/AddEditAlertPage/helpers.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend documentation Improvements or additions to documentation Frontend java Pull requests that update Java code Python SDK python Pull requests that update Python code 🔴 size/XL tests Including test files, or tests related like configuration. TypeScript SDK typescript *.ts *.tsx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant