Skip to content
  • Steve Xuereb's avatar
    Add timeout when waiting for build to finish · ee6ee395
    Steve Xuereb authored
    This is what happens for jobs like `304673282`. If we look at the logs
    for `304673282` (full analysis [here](https://gitlab.com/gitlab-org/gitlab-runner/issues/4147#job-id-304673282))
    we can see that the state was updated to `timedout` but we never
    see error logs like `execution took longer than`, we only log
    this in [1 place](https://gitlab.com/gitlab-org/gitlab-runner/blob/e8591acf/common/build.go#L323-326).
    We only update the state to `timedout` in
    [1 place](https://gitlab.com/gitlab-org/gitlab-runner/blob/e8591acf/common/build.go#L322).
    So if we see where
    [handleError](https://gitlab.com/gitlab-org/gitlab-runner/blob/e8591acf/common/build.go#L315-332)
    is called, it's called in 2 places, the one we are interesting
    in is [when the context (timeout) is
    done/canceled](https://gitlab.com/gitlab-org/gitlab-runner/blob/e8591acf/common/bui...
    ee6ee395