Azure deploy fails if commit message is bigger than 8kb
Describe the bug Deploying to Azure Web App fails with 502 BAD GATEWAY, if the commit message is longer than 8kb.
To Reproduce Steps to reproduce the behavior:
- Create Node App
- Commit with a long message (>=8kb)
- Deploy to Azure Web App using the default workflow
- Check logs; should fail with 502
Expected behavior Deploy correctly regardless of commit message; truncate if needed or generate proper warning/error message as 502 is quite vague.
Runner Version and Platform
Version of your runner: 2.298.2
OS of the machine running the runner? Ubuntu, 20.04.05, LTS
What's not working?
Please include error messages and screenshots.
Deploy to Azure:

Job Log Output
If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.
Run azure/webapps-deploy@v2 with: app-name: XXXXXXXX slot-name: Production publish-profile: *** package: . Package deployment using ZIP Deploy initiated. Error: Failed to deploy web package to App Service. Error: Deployment Failed with Error: Error: Failed to deploy web package to App Service. Bad Gateway (CODE: 502) App Service Application URL: https://XXXXXXXX.azurewebsites.net
Runner and Worker's Diagnostic Logs
If applicable, add relevant diagnostic log information. Logs are located in the runner's _diag folder. The runner logs are prefixed with Runner_ and the worker logs are prefixed with Worker_. Each job run correlates to a worker log. All sensitive information should already be masked out, but please double-check before pasting here.
I had the same error today. Thanks to your issue ... to your "Describe the bug" I was able to find out the cause of the error and to avoid the error. I appreciate it.
You are right, 502 is quite an ambiguous message. I hope this issue will be fixed.
Maybe this needs to be raised at @Azure/webapps-deploy The code that fails is clearly from the actions rather than the runner. The trimming part needs to be done at the action source.
Technically there isn;t any limit to commit message. https://stackoverflow.com/a/9733872/2557818