Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: nats triggers #5039

Merged
merged 8 commits into from
Jan 10, 2025
Merged

feat: nats triggers #5039

merged 8 commits into from
Jan 10, 2025

Conversation

HugoCasa
Copy link
Contributor

@HugoCasa HugoCasa commented Jan 9, 2025

  • feat: nats triggers
  • missing files

Important

Add NATS triggers to the system, enabling scripts and flows to be triggered by NATS events, with updates to UI, backend, and database.

  • Behavior:
    • Add NATS triggers to handle events, similar to existing Kafka and WebSocket triggers.
    • Update NatsTriggerService to manage NATS triggers in nats_triggers/+page.svelte.
    • Add NATS trigger UI components like NatsTriggerEditor and NatsTriggersPanel.
  • Database:
    • Add nats_trigger table in 20250106164709_nats_triggers.up.sql and 20250106164709_nats_triggers.down.sql.
    • Update trigger_kind enum to include 'nats'.
  • Frontend:
    • Update TriggersEditorSection.svelte and TriggersWrapper.svelte to support NATS triggers.
    • Add NATS trigger handling in script_helpers.ts and +layout.svelte.
    • Add NATS trigger UI in +page.svelte files for scripts, flows, and triggers.
  • Backend:
    • Add NATS trigger handling in capture.rs and triggers.rs.
    • Implement NATS consumer logic in nats_triggers_ee.rs.

This description was created by Ellipsis for 4c9b349. It will automatically update as commits are pushed.

Copy link

cloudflare-workers-and-pages bot commented Jan 9, 2025

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9b30da4
Status:⚡️  Build in progress...

View logs

@HugoCasa HugoCasa marked this pull request as ready for review January 10, 2025 18:38
@HugoCasa HugoCasa requested a review from rubenfiszel as a code owner January 10, 2025 18:38
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 4c9b349 in 1 minute and 50 seconds

More details
  • Looked at 4220 lines of code in 80 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/routes/(root)/(logged)/nats_triggers/+page.svelte:49
  • Draft comment:
    Consider refactoring the interval logic for updating triggers to a shared utility function to avoid code duplication across NATS, Kafka, and Websocket trigger pages.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code for handling the interval in the NATS, Kafka, and Websocket trigger pages is identical. This presents an opportunity to refactor the code to avoid duplication and improve maintainability.

Workflow ID: wflow_3KLXTI9gA47icUpx


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@rubenfiszel rubenfiszel merged commit e66fcf9 into main Jan 10, 2025
3 of 4 checks passed
@rubenfiszel rubenfiszel deleted the hugo/win-746-nats-triggers branch January 10, 2025 18:47
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants