Commit Graph

20 Commits

Author SHA1 Message Date
Alexis Couvreur
00cc153d7a fix: add http error responses (#494)
This features adds rfc7807 Problem detail responses when an error happens processing a request.

This will greatly improve the common issues  with "blank pages" and "404 pages" issues which should now properly tell the user what input was wrong (group that does not exist, container name that does not exist, etc.)
2025-02-02 00:00:49 -05:00
Alexis Couvreur
8b113a3c76 fix: changing module to github.com/sablierapp/sablier 2024-10-20 23:54:53 -04:00
Alexis Couvreur
1685b4e820 fix(session): properly set state name when started successfully 2024-10-01 17:30:14 -07:00
Alexis Couvreur
ef888f627d fix(sessions): return and heanlde error everytime 2024-10-01 17:30:14 -07:00
Alexis Couvreur
c6f0628411 perf(providers): retrieve state on start instead of assuming starting (#350)
When an instance does not exist yet and needs to be started, its status is not assumed to be starting anymore.

Instead, the statue will be retrieved from the provider. This changes one thing, it's that you may be able to start and access your services instantly because they'll be instantly seen as ready.

With this change, you might want to make sure that your containers have a proper healthcheck used to determine when the application is able to process incoming requests.

* refactor: add interface guards

* refactor(providers): remove instance.State as a return value from Stop and Start

* test(e2e): add healthcheck on nginx container

Because now the container check is so fast, we need to add a delay on which the container is considered started and healthy to have a proper waiting page.

* fix(tests): using acouvreur/whoami:v1.10.2 instead of containous/whoami:v1.5.0

This image simply retrieve the curl binary from curlimages/curl:8.8.0 to be able to add proper docker healthcheck commands.

Once this is merged with traefik/whoami, I'll update back to the original image.

See https://github.com/traefik/whoami/issues/33
2024-10-01 17:30:14 -07:00
Alexis Couvreur
72ea3b3645 refactor(provider): pass context.Context down to all operations
This means that with more work, a canceled request would cancel to underlying request.
2023-09-15 01:03:41 +02:00
Alexis Couvreur
795792058f feat: add filter by labels (#134)
You are now able to use labels on containers and services such as `--sablier.enable=true` and `--sablier.group=mygroup` to select groups.
2023-03-28 21:31:22 -04:00
Alexis Couvreur
406a93b10e fix: typo NotifyInsanceStopped to NotifyInstanceStopped 2022-11-14 03:57:31 +00:00
Alexis Couvreur
cca050be08 fix(sessions): request blocking session is stopped upon user cancellation 2022-11-11 17:00:35 -05:00
Alexis Couvreur
006fb6679b refactor(events): close the channel from the sender 2022-11-11 17:00:35 -05:00
Alexis Couvreur
1ca1934b1c feat(docker): listens for container stopped event
When a container is shutdown manually while it's registered as `ready` in Sablier it will remove it from the store.
Meaning externally events are now handled for docker.
2022-11-06 00:24:10 -04:00
Alexis Couvreur
8096a4e87e feat: add DesiredReplicas inside State struct
For now only the `Kubernetes` provider benefits from this improvement as `Docker` and `Swarm` have hardcoded 1 value
2022-11-03 20:55:09 -04:00
Alexis Couvreur
8a85a32561 feat: update JSON object returned by blocking strategy
Closes #68
2022-11-03 16:37:41 -04:00
Alexis Couvreur
411c2b2dc6 fix(tinykv): remove expired values from UnmarshalJSON 2022-11-02 23:15:06 -04:00
Alexis Couvreur
154bb5e7ed feat: pretty json 2022-11-02 23:15:06 -04:00
Alexis Couvreur
efc41311e4 fix(sessions): add MarshalJSON for SessionState 2022-11-02 23:15:06 -04:00
Alexis Couvreur
6eb0789b7b feat(strategies): add blocking strategy 2022-11-02 23:15:06 -04:00
Alexis Couvreur
723ee38a3e feat(plugins): add traefik plugin 2022-11-02 23:15:06 -04:00
Alexis Couvreur
04c55c2f49 stabilization 2022-11-02 23:15:06 -04:00
Alexis Couvreur
c827154506 refactor: instance are in unrecoverable state instead of error
To avoid confusion between error from a call or network.
Instance has an Unrecoverable state instead of Error.
2022-11-02 23:15:06 -04:00