support notification of releases to irc channel

Bug #1227985 reported by Khai Do on 2013-09-20
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Fix Released
Low
Ricardo Carrillo Cruz

Bug Description

It would be great if we could get notifications on irc when there is a project releases.

Khai Do (zaro0508) wrote :

I think the best trigger for generating this notification would be when a release tag is created in gerrit. We do have a release naming convention (https://wiki.openstack.org/wiki/Release_Naming) so that might be a good regex to determine if there is a release. IMO i think i would only want notifications for final releases, NOT for the alpha, beta, etc. releases. In terms of the notification message something like "Hot cakes, new release of Nova x.x.x" would be suffice.

Clark Boylan (cboylan) on 2013-10-22
Changed in openstack-ci:
status: New → Triaged
importance: Undecided → Low
milestone: none → icehouse
tags: added: low-hanging-fruit
Changed in openstack-ci:
assignee: nobody → Ricardo Carrillo Cruz (rcarrillocruz)

Need to deploy a vm with Git/Gerrit to test how it shows up a 'git tag blah' in the gerrit event streams.
Upon that, will look into gerritbot to match the event and post the message to the channel,

Deployed a VM with gerrit/git.

If I run the following commands to create and push a tag to gerrit:

<snip>
git tag -a 2014.06.03 -m "March release"
git push gerrit 2014.06.03
</snip>

then gerrit events stream logs that action as:

<snip>
{"type":"ref-updated","submitter":{"name":"Ricardo Carrillo Cruz","email":"<email address hidden>","username":"rcarrillocruz"},"refUpdate":{"oldRev":"0000000000000000000000000000000000000000","newRev":"b3510fbe11adeba89abb03db451b83e86ba4abce","refName":"refs/tags/2014.06.03","project":"demo/gerrittest"}}
</snip>

So now it's a matter of adding a method to the Gerrit class in bot.py that handles the 'ref-updated' event and checks whether the 'refName' field to contain a release tag.

Changed in openstack-ci:
status: Triaged → In Progress
James E. Blair (corvus) wrote :

I think that looks about right. I think though that rather than trying to encode the rules for what is a release tag vs some other kind of tag (it's a REALLY long regex), we should just have the bot announce all tags. They are all interesting and rare enough that I think that will suit the purpose.

So just have it match "refs/tags/.*", and then announce something like "<username> tagged <project> with <tagname>".

Reviewed: https://review.openstack.org/79205
Committed: https://git.openstack.org/cgit/openstack-infra/gerritbot/commit/?id=575b062cbd46957d31dd21fa94bacd1d507dbbee
Submitter: Jenkins
Branch: master

commit 575b062cbd46957d31dd21fa94bacd1d507dbbee
Author: Ricardo Carrillo Cruz <email address hidden>
Date: Sun Mar 9 19:51:57 2014 +0000

    Add support for notification of releases on IRC

    Closes-Bug: #1227985

    Change-Id: I9b80b465d9d6b0e2793286cc8229b82b4389a08d

Changed in openstack-ci:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers