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

[E2E][CI] Setup Playwright webServer #9730

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

prastoin
Copy link
Contributor

@prastoin prastoin commented Jan 17, 2025

WIP

Worker HealthCheck

We should expose an endpoint on the twenty-server that will through redis poll the worker to get its status.
In this way we will gain enough grain to allow adding the worker in the playwright devServers entries

@FelixMalfait
Copy link
Member

FelixMalfait commented Jan 17, 2025

Cool! The endpoint could dispatch a job to the queue that writes a unique value to Postgres or Redis, and then check for the existence of that unique value in a while loop until a given timeout. By default it could be in a higher priority queue (if we have queue prioritization setup I'm not sure...), but in the future you could imagine that you could even have an optimal queue parameter to give the health of a given queue (e.g. if email queue is full)

@prastoin
Copy link
Contributor Author

prastoin commented Jan 18, 2025

Indeed, definitely ! Thanks for sharing that
We've been discussing this topic with @charlesBochet and @Weiko yesterday evening.
Thing is right now we need an healthCheck to get the worker's status agnostically of the queues, this could come from an exchange through Redis or postgres but this might be the most idiomatic for queue metrics, such as the use case you described with email queue example. But as @Weiko has been saying in our case writing a local file and serving it through a small Node instance could do the job
Anyway we might need both level of health heck and metrics in the future

@FelixMalfait
Copy link
Member

Yes. FYI this is also something we'll need in the admin panel: https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=50385-166650&t=aNkyMln4OPpsfUS9-0

Settings - Admin Panel - System

Feel free to sync with @ehconitin once you've completed the endpoints, he's worked on the admin panel UI already so if you provide the backend he can probably do the admin panel ui

@ehconitin
Copy link
Contributor

@FelixMalfait Absolutely! @prastoin, once this PR is merged, could you catch me up on the endpoints? 😊

@prastoin
Copy link
Contributor Author

prastoin commented Jan 20, 2025

@FelixMalfait Absolutely! @prastoin, once this PR is merged, could you catch me up on the endpoints? 😊

Sounds great !
Yes of course this might not be in this PR exactly but I'll link it to this one

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

Successfully merging this pull request may close these issues.

3 participants