ComunidadAylas/PackSquash-action

Problems with PackSquash workflow

osfanbuff63 opened this issue · 2 comments

I'm using PackSquash in a release workflow (you can see here) and it keeps erroring at the PackSquash step with Error: Error: The process '/usr/bin/git' failed with exit code 128. I believe it's PackSquash causing the error - but I'm not sure, and Google didn't help much.

Thank you for reporting the issue!

Indeed we made some significant performance improvements to the action some days ago, as you have already noticed. Moreover, the error message you saw is highly technical and generic, so it's reasonable to think that our latest changes could be causing it.

I have reproduced the problem and, upon closer inspection of the workflow you linked to, I concluded that its cause is that the workflow does not check out the repository before the PackSquash action runs. The action expects a checkout of the pack repository to be available if the caching feature is enabled (which is the default), and it could not find one, so Git ended up reporting that in the form of an error status code.

The PackSquash action was never meant to work on this scenario, so if it happened to work before, it was unintentional, likely broken, and could be considered an oversight.

Of course, the trivial way to fix the problem is to checkout the pack beforehand, but that might not be a satisfactory solution for you. If you need to use a downloaded pack artifact directly with the action without checking out any repository, like that workflow does, the never_store_squash_times action parameter must be set to true to disable the caching feature. This will avoid the error, but it might be slower as the cache definitely won't kick in.

Anyway, I've pushed a change that improves the error message the action shows in this situation, so it should be easier to troubleshoot in the future.

Let us know if you need further assistance 😄

Worked just fine, and still runs so much faster than it did before :)