Gitea Snap update issue #16209 #17157

Open
OleHusgaard wants to merge 8 commits from OleHusgaard/main into main
OleHusgaard commented 2021-09-26 11:53:57 +00:00 (Migrated from github.com)

Fixes https://github.com/go-gitea/gitea/issues/16209 for new repositories created. The problem is that hooks in new repositories created when running in snap include the snap revision in the path. As the snap is refreshed the hooks eventually break.
This pull request does not fix repositories already created. Here a good workaround has been suggested by JensTheCoder.
Please be aware that I am a newbie to both gitea, snap and golang.

Fixes https://github.com/go-gitea/gitea/issues/16209 for new repositories created. The problem is that hooks in new repositories created when running in snap include the snap revision in the path. As the snap is refreshed the hooks eventually break. This pull request does not fix repositories already created. Here a good workaround has been suggested by JensTheCoder. Please be aware that I am a newbie to both gitea, snap and golang.
wxiaoguang reviewed 2021-09-26 14:06:36 +00:00

Can you write more comments here? It will be easier for other people to understand what the issue is and how it is fixed.

Can you write more comments here? It will be easier for other people to understand what the issue is and how it is fixed.
OleHusgaard (Migrated from github.com) reviewed 2021-09-26 14:57:47 +00:00
OleHusgaard (Migrated from github.com) commented 2021-09-26 14:57:47 +00:00

I added comments about the problem, and how it is fixed,

I added comments about the problem, and how it is fixed,
wxiaoguang reviewed 2021-09-26 15:35:39 +00:00

Thank you, it's clear for me. I think we should be more careful here:

  1. We should check whether the current path really exists and is valid. If not, an ERROR log should be reported, and fallback to use old AppPath.
  2. We should output an INFO level log to tell users that we are in SNAP and have changed the AppPath for this purpose. Or users may be confused by this behavior (it will be very hard to debug)
Thank you, it's clear for me. I think we should be more careful here: 1. We should check whether the `current` path really exists and is valid. If not, an ERROR log should be reported, and fallback to use old AppPath. 2. We should output an INFO level log to tell users that we are in SNAP and have changed the AppPath for this purpose. Or users may be confused by this behavior (it will be very hard to debug)
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
2 Participants
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: lunny/gitea#17157
No description provided.