GNOME Bugzilla – Bug 719780
Notifications in component channels
Last modified: 2021-06-05 16:29:43 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
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.
(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
Created attachment 263403 [details] [review] A better patch
Review of attachment 263403 [details] [review]: Ok, I'll give this a shot.
Comment on attachment 263403 [details] [review] A better patch https://git.gnome.org/browse/gnome-continuous/commit/?id=43c823b596b6da02f2405ca81646a51d85e3b737
Leaving this open for a bit until we've confirmed it works; the bot is really hard to test.
Created attachment 263916 [details] [review] Convert irc room names to unicode
Created attachment 263917 [details] [review] Convert irc room names from unicode
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.
(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?
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.