ccmenu / ccmenu

CCMenu is a Mac application to monitor continuous integration servers.
https://ccmenu.github.io/ccmenu
Other
337 stars 40 forks source link

Aborted builds show up as failed in the menubar #32

Closed timmfin closed 9 years ago

timmfin commented 9 years ago

It seems like aborted builds show up as failed in the menu. I think it would make more sense to show a gray icon instead of a red one for aborted builds (aborting isn't necessarily a bad thing).

For example, this is what my menu looks like:

image

... for a job who's last build was merely aborted:

image

Another view, from the project window where it says that build "failed" despite it only being aborted (note 1:55pm is 5:55pm because my computer is in EST while the build server is in UTC):

image

erikdoe commented 9 years ago

CCMenu is tied to the information it gets from the CI server. It doesn't have all the information available to the server internally. Could you include a copy of the XML feed that the server sends on aborted builds? Just take the feed URL and retrieve it using curl or similar, e.g. curl -i <the_feed_url>.

timmfin commented 9 years ago

Interesting, in the XML feed I see this:

<Project activity="Sleeping" lastBuildLabel="12" lastBuildStatus="Failure" lastBuildTime="2015-08-26T17:55:03Z" name="EarlyRequesterJS" webUrl="https://<INTERNAL DOMAIN>/jenkins/job/EarlyRequesterJS/"/>

Which unfortunately, doesn't tell you anything about it being aborted. But if I hit the Jenkins API directly for that job there is at least some more helpful information:

  ...
  <color>aborted</color>
  <healthReport>
    <description>Build stability: No recent builds failed.</description>
    <iconClassName>icon-health-80plus</iconClassName>
    <iconUrl>health-80plus.png</iconUrl>
    <score>100</score>
  </healthReport>
  <lastBuild>
    <number>12</number>
    <url>https://<INTERNAL DOMAIN>/jenkins/job/EarlyRequesterJS/12/</url>
  </lastBuild>
  <lastCompletedBuild>
    <number>12</number>
    <url>https://<INTERNAL DOMAIN>/jenkins/job/EarlyRequesterJS/12/</url>
  </lastCompletedBuild>
  <lastStableBuild>
    <number>11</number>
    <url>https://<INTERNAL DOMAIN>/jenkins/job/EarlyRequesterJS/11/</url>
  </lastStableBuild>
  <lastSuccessfulBuild>
    <number>11</number>
    <url>https://<INTERNAL DOMAIN>/jenkins/job/EarlyRequesterJS/11/</url>
  </lastSuccessfulBuild>
  <lastUnsuccessfulBuild>
    <number>12</number>
    <url>https://<INTERNAL DOMAIN>/jenkins/job/EarlyRequesterJS/12/</url>
  </lastUnsuccessfulBuild>
  ...

So in that, there is some useful information (the <color> and <healthReport> elements). But if you are only fetching the feed, well then I don't know if there is anything you can do to fix this.

erikdoe commented 9 years ago

And that is the problem. The feed format was created a long time ago (2002) and never had a community that allowed it to evolve. There are a growing number of servers and several clients, and the only way (without a managing group) for them to remain compatible was to stand still.

Now that gocd is open source, I have considered trying to seed evolution of the feed format by adding new features to gocd and CCMenu, in the hope others will pick them up. This hasn't really happened yet. I have resurrected the feed documentation, though: https://github.com/erikdoe/ccmenu/wiki/Multiple-Project-Summary-Reporting-Standard