check_online uses federation API #23

Open
opened 2022-07-03 13:44:57 +00:00 by Gusted · 3 comments

The Gitea online check, relies on a API that is used for federation.

Within the following version of Gitea, federation is disabled by-default and thus this API won't be available. I'd recommend using the Healthz endpoint for this instead.

The Gitea [online check](https://gitea.hostea.org/Hostea/dashboard/src/commit/5397e38d226b43d6ac3fdf2cb144c95a032b40e9/integration/gitea.py#L55), relies on a API that is used for federation. Within the following version of Gitea, federation [is disabled by-default](https://github.com/go-gitea/gitea/pull/20045) and thus this API won't be available. I'd recommend using the [Healthz](https://github.com/go-gitea/gitea/pull/18465/files) endpoint for this instead.

Thanks for the report, I will switch to using the endpoint you recommended!

Thanks for the report, I will switch to using the endpoint you recommended!
realaravinth self-assigned this 2022-07-03 20:41:30 +00:00

Hostea currently deploys Gitea v1.16.5 whereas the healthz endpoint is shipped in v1.17.0-rc1. Will switch when hostea upgrades Gitea.

Within the app, instance online check is performed only when a Gitea instance is deployed and a deployment success notification email is sent to the costumer. It uses a simple HTTP status check on /.

The code which uses federation endpoint is part of integration tests so delayed switch shouldn't cause significant problem.


@gusted: thanks for comprehensive review. I was a little resistant about deploying my code that hasn't been reviewed but your reviews are reassuring :)

Hostea [currently deploys Gitea v1.16.5](https://lab.enough.community/main/infrastructure/-/blob/master/playbooks/gitea/roles/gitea/defaults/main.yml#L29) whereas the healthz endpoint is shipped in [v1.17.0-rc1](https://github.com/go-gitea/gitea/releases/tag/v1.17.0-rc1). Will switch when hostea upgrades Gitea. Within the app, instance online check is performed only when a Gitea instance is deployed and a deployment success notification email is sent to the costumer. It uses a simple HTTP status check on `/`. The code which uses federation endpoint is part of integration tests so delayed switch shouldn't cause significant problem. --- @gusted: thanks for comprehensive review. I was a little resistant about deploying my code that hasn't been reviewed but your reviews are reassuring :)

FWIW the Enough playbook will enable federation by default https://lab.enough.community/main/infrastructure/-/issues/361

But @Gusted suggestion is good in any case.

FWIW the Enough playbook will enable federation by default https://lab.enough.community/main/infrastructure/-/issues/361 But @Gusted suggestion is good in any case.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Hostea/dashboard#23
There is no content yet.