googleapis / repo-automation-bots

A collection of bots, based on probot, for performing common maintenance tasks across the open-source repos managed by Google on GitHub.
Apache License 2.0
626 stars 126 forks source link

Build Cop: test Ruby XML logs are parsed properly #536

Closed tbpg closed 4 years ago

tbpg commented 4 years ago

I've seen an error in the Build Cop Bot logs for Ruby builds:

TypeError: Cannot read property 'name' of undefined
    at Function.buildcop.findTestResults (/workspace/build/src/buildcop.js:437:52)
    at app.on (/workspace/build/src/buildcop.js:61:32)
    at Application.<anonymous> (/workspace/node_modules/probot/lib/application.js:156:50)
    at step (/workspace/node_modules/probot/lib/application.js:44:23)
    at Object.next (/workspace/node_modules/probot/lib/application.js:25:53)
    at fulfilled (/workspace/node_modules/probot/lib/application.js:16:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)

This one corresponds to this build: https://source.cloud.google.com/results/invocations/0fff566f-a55b-49ca-b900-d6dcfc449729. Normally, the artifacts tab includes the XML file with results, but it looks like it wasn't uploaded to Sponge.

Note that the line number references the built .js file, not the source .ts file. I believe this is the relevant line in the .ts file:

https://github.com/googleapis/repo-automation-bots/blob/09912fc3e895eab02271789102d1c3a476e9ad60/packages/buildcop/src/buildcop.ts#L656

We need a PR like #321 for Ruby.

tbpg commented 4 years ago

Normally, the artifacts tab includes the XML file with results, but it looks like it wasn't uploaded to Sponge.

Ah. If you select one of the other targets on the left-hand side, you'll see an XML file you can download and use in unit tests.

This build might be better because it has tests that passed and failed: https://source.cloud.google.com/results/invocations/5ddf13eb-1868-4c05-bbae-08f07a18e738/targets/github%2Fruby-docs-samples%2Ftranslate/artifacts

tmatsuo commented 4 years ago

I can not reproduce this. Is this still happening?

tbpg commented 4 years ago

Whoops! This was fixed by https://github.com/googleapis/repo-automation-bots/pull/771.