Konstanius / MineCICD

Git for Minecraft Servers! Track changes, speed up development, rollback changes, and much more!
GNU General Public License v3.0
13 stars 1 forks source link

Error when pulling a lot of files from a GitHub repo #9

Closed Zekariaa closed 2 months ago

Zekariaa commented 3 months ago

Hello, I wanted to know, is it normal that the server respond with an Error 500 to the Github webhook, and the "Invalid content" message in the console when pulling more than 20-30 files from a GitHub repository ? I always have to do /minecicd resolve repo-reset and /minecicd pull in order to fix the problem. It happens with all types of file. Thank you for your time and the plugin, it is awesome, and very helpful.

[21:50:33] [HTTP-Dispatcher/INFO]: [MineCICD] Received webhook trigger
[21:50:33] [HTTP-Dispatcher/ERROR]: [MineCICD] Webhook failed to run due to invalid contents

And in Github:

Request method: POST
Accept: */*
Content-Type: application/json
Konstanius commented 3 months ago

This issue is caused by a too long WebHook message payload. https://github.com/Konstanius/MineCICD/blob/545159f806669cb6695baef077d1e853d763df5d/src/main/java/ml/konstanius/minecicd/WebhookHandler.java#L38 The response, however, should be 400, and not 500.

Please try the attached build 2.1.3 to see if that fixes your issue. Why did you have to run minecicd resolve repo-reset? The Web Hook trigger doesnt do anything, so a minecicd pull should succeed.

MineCICD-2.1.3.jar.zip

Zekariaa commented 2 months ago

Hello! Because if we do a minecicd pull after the webhook has failed, it resets the GitHub Repo (Initial setup commit). image

The main webhook problem is solved, thank you! :D Sorry for the long response time.