tcplugins / tcWebHooks

WebHooks plugin for Teamcity. Supports many build states and payload formats.
https://netwolfuk.wordpress.com/category/teamcity/tcplugins/tcwebhooks/
155 stars 30 forks source link

Invalid message for failed composite builds #168

Closed seregamorph closed 2 years ago

seregamorph commented 4 years ago

I have a composite build of three dependencies: Screen Shot 2020-09-18 at 13 52 44

When I execute it and two of three dep fails, the teamcity UI reports looks correct (success 1, failed 2): Screen Shot 2020-09-18 at 13 52 09

But the payload (legacy json) has wrong message field buildStatus:

payload={"build": {
  "buildStatus": "Tests failed: 416 (416 new), passed: 1964; Build chain finished (success: 1, failed: 3)",
  "buildResult": "failure",
  "buildResultPrevious": "success",
  "buildResultDelta": "broken",
  "notifyType": "buildFinished",

Expected Behavior

Message in hook payload should match teamcity UI.

Current Behavior

Wrong message (illegal count of failed tasks)

Steps to Reproduce (for bugs)

  1. create a composite build of 3 deps
  2. run a build that fails on one of three

Your Environment

Example Configuration (xml)

netwolfuk commented 4 years ago

Hi @seregamorph

My code is just calling sBuild.getStatusDescriptor().getText(). The actual text comes from TeamCity. This looks like it could be a bug in TeamCity.

netwolfuk commented 4 years ago

Question asked of TeamCity support: https://youtrack.jetbrains.com/issue/TW-67780

seregamorph commented 4 years ago

In this case it looks like a bug on the TeamCity side.

seregamorph commented 3 years ago

Just for your information. On latest TeamCity 2020.2 I still have this issue: TeamCity UI message: Tests passed: 1400; Build chain finished (success: 2, failed: 1) Notification text: Tests passed: 1400; Build chain finished (success: 2, failed: 2) Will dup this message to YouTrack

netwolfuk commented 2 years ago

I don't think there is anything I can do to resolve this issue. Hopefully they can fix it in TeamCity.