-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Pushes via deployment write keys do not trigger reindex #3795
Comments
This bug just hit me hard and took me hours to realize what the problem was. Any update on this? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
@bjoe2k4 need more investigation. |
I'm using the latest HEAD and have the exact same problem. Using read/write deploy keys, the cache is not invalidated when pushing, using a user key, it is. Can I help investigating @lunny? |
This is pushing with SSH keys? I bet the environment variables for the hooks aren't being set properly. |
Not regular ssh key push, pushing with rw-enabled deployment keys. |
Yep, taking a look at gitea cmd/serv.go the environment settings aren't properly set. |
I've pushed a branch to github but not opened a PR just yet until I've had a chance to test it |
…ment variables (#5935) The gitea prerecieve and postrecieve hooks and the gitea PushUpdate function require that the PusherID and PusherName are real users. Previously, these environment variables were not being set when using a deploy key - the main result being that pushing to empty repositories meant that is_empty status was not changed. I've also added an integration test to ensure that the is_empty status is updated on pushing with a deploy key. There is a slight issue in that the deploy key is now considered a proxy for the owner - we don't have a way of separating out the deploy key from the owner at present. This can be fixed in another PR. Fix #3795 Signed-off-by: Andrew Thornton [email protected]
…ment variables (go-gitea#5935) The gitea prerecieve and postrecieve hooks and the gitea PushUpdate function require that the PusherID and PusherName are real users. Previously, these environment variables were not being set when using a deploy key - the main result being that pushing to empty repositories meant that is_empty status was not changed. I've also added an integration test to ensure that the is_empty status is updated on pushing with a deploy key. There is a slight issue in that the deploy key is now considered a proxy for the owner - we don't have a way of separating out the deploy key from the owner at present. This can be fixed in another PR. Fix go-gitea#3795 Signed-off-by: Andrew Thornton [email protected]
…ment variables (go-gitea#5935) The gitea prerecieve and postrecieve hooks and the gitea PushUpdate function require that the PusherID and PusherName are real users. Previously, these environment variables were not being set when using a deploy key - the main result being that pushing to empty repositories meant that is_empty status was not changed. I've also added an integration test to ensure that the is_empty status is updated on pushing with a deploy key. There is a slight issue in that the deploy key is now considered a proxy for the owner - we don't have a way of separating out the deploy key from the owner at present. This can be fixed in another PR. Fix go-gitea#3795 Signed-off-by: Andrew Thornton [email protected] Cherry-pick: 13c0f7d
…ment variables (#5935) (#5944) The gitea prerecieve and postrecieve hooks and the gitea PushUpdate function require that the PusherID and PusherName are real users. Previously, these environment variables were not being set when using a deploy key - the main result being that pushing to empty repositories meant that is_empty status was not changed. I've also added an integration test to ensure that the is_empty status is updated on pushing with a deploy key. There is a slight issue in that the deploy key is now considered a proxy for the owner - we don't have a way of separating out the deploy key from the owner at present. This can be fixed in another PR. Fix #3795 Signed-off-by: Andrew Thornton [email protected]
@lunny I can confirm this fixes the issue. |
38a9cda
[x]
): n/aDescription
It seems pushes to repos with rw deployment keys do not trigger a reindex of the repo or the "commit" event.
Reproduced on try.gitea: https://try.gitea.io/mqudsi/test-deploy
That repo appears blank, but it has content.
The text was updated successfully, but these errors were encountered: