test-reporter icon indicating copy to clipboard operation
test-reporter copied to clipboard

Long Branch names cause test formatter to fail

Open AdrianMF opened this issue 5 years ago • 0 comments

We are running CC with a Jenkins CI. We were facing an issue where we were getting seemly random failures of the type:

[2020-01-17T16:42:18.563Z] [Pipeline] sh
[2020-01-17T16:42:19.907Z] + ./cc-test-reporter format-coverage -t cobertura target/scala-2.13/coverage-report/cobertura.xml
[2020-01-17T16:42:19.907Z] time="2020-01-17T16:42:19Z" level=error msg="failed to read file com/mf/common/repository/mongodb/util/RepositoryUtil.scala\nopen com/mf/common/repository/mongodb/util/RepositoryUtil.scala: no such file or directory"
[2020-01-17T16:42:19.907Z] Error: open com/mf/common/repository/mongodb/util/RepositoryUtil.scala: no such file or directory
[2020-01-17T16:42:19.907Z] Usage:
[2020-01-17T16:42:19.907Z]   cc-test-reporter format-coverage [coverage file] [flags]
[2020-01-17T16:42:19.907Z]

After a lot of experimentation, we determined that when our branch names were longer than 17 characters, combined with a deep directory structure in our modules, it cause the format-coverage command to fail. Presumably because the string length of the total directory structure hit some kind of limit. When the name of the branch was under 17 characters, everything ran fine. Further tests confirmed this fact.

AdrianMF avatar Jan 17 '20 17:01 AdrianMF