After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 719780 - Notifications in component channels
Notifications in component channels
Status: RESOLVED OBSOLETE
Product: gnome-continuous
Classification: Other
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Continuous maintainer(s)
GNOME Continuous maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-12-03 15:20 UTC by Vadim Rutkovsky
Modified: 2021-06-05 16:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (3.08 KB, patch)
2013-12-03 15:20 UTC, Vadim Rutkovsky
reviewed Details | Review
A better patch (3.11 KB, patch)
2013-12-03 16:20 UTC, Vadim Rutkovsky
committed Details | Review
Convert irc room names to unicode (1.05 KB, patch)
2013-12-10 14:07 UTC, Vadim Rutkovsky
none Details | Review
Convert irc room names from unicode (1.06 KB, patch)
2013-12-10 14:09 UTC, Vadim Rutkovsky
accepted-commit_now Details | Review

Description Vadim Rutkovsky 2013-12-03 15:20:16 UTC
Created attachment 263399 [details] [review]
Proposed patch

It would be useful to have per-component notifications on changed tasks. The component developers should add 'irc_room' parameter to component manifest
Comment 1 Colin Walters 2013-12-03 15:28:49 UTC
Review of attachment 263399 [details] [review]:

This is a clever hack =)  Can you briefly mention who wants this?  I'd like to see a sample change to manifest.json too.

I think the commit message would be clearer as:

"bot: Read irc_room property of components in manifest to announce builds"

::: extras/ircbot/bot.py
@@ +171,3 @@
+        snapshot_path = os.path.join(current_task_path, 'snapshot.json')
+        if not os.path.exists(snapshot_path):
+            return []

I have a slight preference for loading the manifest.json once at start, rather than parsing the snapshot.json from each build.

Just have a config option for the path to the gnome-continuous git source tree?

Or alternatively, if you do want to parse snapshot.json, we need to join/leave channels based on that.
Comment 2 Vadim Rutkovsky 2013-12-03 16:20:31 UTC
(In reply to comment #1)
> This is a clever hack =)  Can you briefly mention who wants this?
I'm mostly thinking of evolution, but any team interested in automated testing would be welcome. 
The background for evolution team is some commits might break insignificant parts of the app as some might be lazy to run make check before commit. 

Another usecase is intermittently failing tests (leaking file descriptors, race conditions). There should be a better way to do this (like per-component status pages a-la Jenkins) but for now it should be sufficient to draw attention to failing tests

>  I'd like to see a sample change to manifest.json too.

This would be triggered by change in manifest.json:
    {"src": "gnome:evolution-data-server",
+    "irc_room": "evolution",
     "config-opts": ["--enable-installed-tests",
                     "--enable-vala-bindings",
                     "--disable-uoa"]},

> I think the commit message would be clearer as:
> 
> "bot: Read irc_room property of components in manifest to announce builds"
Right, updated the patch
 
> I have a slight preference for loading the manifest.json once at start, rather
> than parsing the snapshot.json from each build.
Agreed, but then we'll have to restart the bot each time manifest.json is updated. On the other hand json loading and parsing is rather quick (on my machine):

$ time python -c "import json; build = json.load(open('build.json', 'r')); build['snapshot']['components']"
python -c   0.01s user 0.01s system 98% cpu 0.019 total

> Or alternatively, if you do want to parse snapshot.json, we need to join/leave
> channels based on that.
The bot will join the new channel unless it's not there yet (a list is stored in self._joined_channels). Leaving is a bit more complicated - not sure how do we track
Comment 3 Vadim Rutkovsky 2013-12-03 16:20:46 UTC
Created attachment 263403 [details] [review]
A better patch
Comment 4 Colin Walters 2013-12-03 16:53:33 UTC
Review of attachment 263403 [details] [review]:

Ok, I'll give this a shot.
Comment 6 Colin Walters 2013-12-03 18:59:58 UTC
Leaving this open for a bit until we've confirmed it works; the bot is really hard to test.
Comment 7 Vadim Rutkovsky 2013-12-10 14:07:33 UTC
Created attachment 263916 [details] [review]
Convert irc room names to unicode
Comment 8 Vadim Rutkovsky 2013-12-10 14:09:54 UTC
Created attachment 263917 [details] [review]
Convert irc room names from unicode
Comment 9 Colin Walters 2013-12-10 14:17:49 UTC
Review of attachment 263917 [details] [review]:

Ok, let's give this a shot.

::: extras/ircbot/bot.py
@@ +182,3 @@
         component_descriptions = [x for x in snapshot['components'] if 'name' in x.keys() and x['name'] in component_names]
 
+        return [x['irc_room'].decode("utf-8") for x in component_descriptions if 'irc_room' in x.keys()]

I think you want .encode() and not .decode().  I'll make that change and give this a shot.
Comment 10 Vadim Rutkovsky 2014-02-13 16:16:36 UTC
(In reply to comment #9)
> I think you want .encode() and not .decode().  I'll make that change and give
> this a shot.

Apparently it didn't work - the bot didn't join #evolution channel. I'm sure it should be 'encode' - the bot expects a unicode channel name, can we try the original patch?
Comment 11 André Klapper 2021-06-05 16:29:43 UTC
gnome-continuous is not under active development anymore. Its codebase has been archived: https://gitlab.gnome.org/Archive/gnome-continuous

Closing all its open tickets as part of housekeeping.