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: webhook workers #542

Merged
merged 130 commits into from
Jun 25, 2024
Merged

feat: webhook workers #542

merged 130 commits into from
Jun 25, 2024

Conversation

steebchen
Copy link
Member

@steebchen steebchen commented May 30, 2024

Description

fix #347

Type of change

  • New feature (non-breaking change which adds functionality)

What's Changed

TODO

  • webhook request check (mark step as failed if webhook returns non-200)
  • basic healthcheck (call API route before starting)
  • advanced healtcheck (ping continuously and take down worker if more than 3 failed healthchecks)
  • change action names to get from healthcheck instead of query
  • return response only once stuff is processed
  • do not require workflow IDs to be specified in registerWorkflow (or UI), do that automatically instead
  • think about: changing workflows (with their actions) or assigning new workflows to webhook workers, and killing existing ones/re-creating (internal note: check both worfklows and actions (via workflow hash?) and re-create if needed)
  • !!! the healthcheck needs to automatically update/register the workflow (it doesn't seem to be registering it the first time?)
    • Go client
      • requires refactor of .On->.RegisterWorkflow methods and signature
    • TS client
  • TS client: check for signature as middleware
  • !!! verify webhook secret in health endpoint to make sure it is set correctly before sending any events
  • !! cleanup hardcoded env vars (token & tlsStrategy)
  • !! do not re-create token every time
  • investigate bug where no healthcheck requests are sent (might be invalid now, not sure)
  • encrypt token
  • rewrite queries to sqlc x)
  • test services
  • test register action
  • delete webhook workers
    • (API & UI)
    • stop currently running workers
  • add webhook worker name to DB and UI
  • optional: vercel streaming or waitUntil

Copy link

vercel bot commented May 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hatchet-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 25, 2024 8:42pm

api-contracts/openapi/openapi.yaml Outdated Show resolved Hide resolved
internal/services/webhooks/webhooks.go Outdated Show resolved Hide resolved
Copy link
Contributor

@grutt grutt left a comment

Choose a reason for hiding this comment

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

good work.
a few minor nits and questions but probably nothing show stopping

api/v1/server/handlers/webhook-worker/list.go Outdated Show resolved Hide resolved
frontend/app/src/router.tsx Show resolved Hide resolved
internal/services/webhooks/webhooks.go Show resolved Hide resolved
internal/whrequest/request.go Show resolved Hide resolved
prisma/schema.prisma Show resolved Hide resolved
prisma/schema.prisma Show resolved Hide resolved
@abelanger5 abelanger5 merged commit 1490d88 into main Jun 25, 2024
25 checks passed
@abelanger5 abelanger5 deleted the webhook-workers branch June 25, 2024 21:06
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.

Serverless support
3 participants