lambci icon indicating copy to clipboard operation
lambci copied to clipboard

Report failure when git checkout fails

Open dej611 opened this issue 9 years ago • 4 comments

Hi,

I've started using LambCI recently and hit an issue with the repo I'm working on. In particular we have a repo with a huge number of files: given the current limitations of the AWS Lambda on disk capacity we were facing a point where the git checkout process was failing.

An example log is the following:

...
Checking out files: 54% (XXX/YYY) error: unable to write file ...
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
Command "git clone --depth 5 https://[email protected]/{user}/{repo}.git -b {branch} /tmp/lambci/build/{user}/{repo}" failed with code 128

LambCI at this point will just exit, although I would expect a failure response in this case.

I'll try to send a PR for this to be reviewed, but for the moment I thought it was worth log the issue.

dej611 avatar Sep 20 '16 09:09 dej611

When you say you expect a failure response – do you mean that the build wasn't being marked as failed? What state was it in?

mhart avatar Sep 20 '16 12:09 mhart

When git checkout fails no feedback is sent to either S3, Github or Slack.

In DynamoDB, in the lambci-builds table I can find all the successful and failed builds, plus a bunch of partial entries. The only way I had to understand what was happening was to go on CloudWatch and read the log.
Not sure if there was any other way to check the build state.

dej611 avatar Sep 20 '16 13:09 dej611

Gotcha – right, the problem is that it's impossible to know the full configuration until a git clone – because the config files can sit in the repository itself.

So things like the Slack channel to post to, whether or not to save HTML log files to S3 etc, could all depend on settings in the config files.

LambCI could fall back to just using the defaults – ie, whatever config is in the DB – and that way you'd hopefully get some notification – but it just might not be what you're expecting

Not sure what to do in this case. At the very least, the GitHub status should be able to be updated – and it should be possible to post to Slack, although it may go in the wrong channel/room.

mhart avatar Sep 20 '16 14:09 mhart

I see your point. I think it is still worth documenting the issue and agree that try to send the response is a good approach here.

dej611 avatar Sep 20 '16 16:09 dej611