SAP / InfraBox

InfraBox is a cloud native continuous integration system
Apache License 2.0
268 stars 63 forks source link

Failed to traverse parents of commit #269

Closed ascend1 closed 5 years ago

ascend1 commented 5 years ago

Describe the bug Build fails with error "Could not read [hash]" and then "Failed to traverse parents of commit [hash]".

To Reproduce Restart the following job: https://infrabox.datahub.only.sap/dashboard/#/project/hanalite/build/37395/2

Expected behavior Build the code successfully.

Screenshots None.

Additional context It seems that recheck-schedule generates "repository": { "full_history" : true }, but InfraBox ignores it.

epDHowwD commented 5 years ago

The failing job was generated with repository.full_history=True https://infrabox.datahub.only.sap/api/v1/projects/a83b22e2-3938-4125-86f1-414bd6fe86a6/jobs/77469abd-a362-4abe-a146-3969c2b2851c/console

13:11:15|## Creating jobs
13:11:15|{
13:11:15|    "version": 1, 
13:11:15|    "jobs": [
13:11:15|        {
13:11:15|            "name": "build-and-test-disk", 
13:11:15|            "docker_file": "infrabox/test/recheck/Dockerfile", 
13:11:15|            "build_only": false, 
13:11:15|            "environment": {
13:11:15|                "RECHECK_PARALLEL_JOBS": "4", 
13:11:15|                "HM_BUILD_PROFILE": "debug-amalgam-gcc6", 
13:11:15|                "RECHECK_SUITE_FILE": "/vora/build/debug-amalgam-gcc6/infrabox_suites/disk.json", 
13:11:15|                "RECHECK_ACTION": "execute", 
13:11:15|                "HM_NUM_JOBS": "3"
13:11:15|            }, 
13:11:15|            "build_context": "../..", 
13:11:15|            "timeout": 10800, 
13:11:15|            "repository": {
13:11:15|                "full_history": true
13:11:15|            }, 
13:11:15|            "type": "docker", 
13:11:15|            "resources": {
13:11:15|                "limits": {
13:11:15|                    "cpu": 3, 
13:11:15|                    "memory": 12288
13:11:15|                }
13:11:15|            }
13:11:15|        }
13:11:15|    ]
13:11:15|}

But it still cloned and fetched with --depth 10:

14:11:42|git clone --depth=10 ssh://InfraBox@git.wdf.sap.corp:29418/hanalite /data/repo
14:11:42|Cloning into '/data/repo'...
14:11:43|Warning: Permanently added the RSA host key for IP address '[10.17.81.121]:29418' to the list of known hosts.
14:11:53|Total 27532 (delta 5854), reused 15863 (delta 5854)
14:11:55|git fetch --depth=10 ssh://InfraBox@git.wdf.sap.corp:29418/hanalite refs/changes/38/3900438/2

This in turn leads to the aforementioned error:

13:13:50|error: Could not read 1a66087c4e80ef9d53b98619d89ac108141ddde2
13:13:50|fatal: Failed to traverse parents of commit 7fd1e01e210615918b829c13bec565987d52f3da