Page MenuHome

Blender Bot to notify on Build failure
Needs ReviewPublic

Authored by Himanshi Kalra (calra) on Feb 5 2021, 5:04 PM.

Details

Summary

This patch adds a service to the Blender Buildbot to notify on #blender-coders channel in case of a Build failure or exception.

  • The User ID and Auth Token are empty and still needs to be added before deploying.
  • It was tested on a localhost sample build mimicking the names of the blender builders but not the actual source.

Here is a sample of what the message would look like.

Diff Detail

Repository
rBB Blender Buildbot
Branch
blenderbot (branched from master)
Build Status
Buildable 12807
Build 12807: arc lint + arc unit

Event Timeline

Himanshi Kalra (calra) requested review of this revision.Feb 5 2021, 5:04 PM
Himanshi Kalra (calra) created this revision.
Himanshi Kalra (calra) edited the summary of this revision. (Show Details)
Brecht Van Lommel (brecht) requested changes to this revision.Feb 8 2021, 11:17 AM
Brecht Van Lommel (brecht) added inline comments.
blender_bot_helper.py
33

Where does this value come from? At least mention it in a comment.

Probably a better variable name is something like ÇHANNEL_ID.

47

Don't list every platform since we'll soon add more and then this breaks.

Instead just check if custom_branch is part of the name.

68

Check this earlier in the function.

69

Are there exceptions to be handled here?

We wouldn't want blender.chat being offline to also bring down the buildbot.

This revision now requires changes to proceed.Feb 8 2021, 11:17 AM

Addressed the comments

Himanshi Kalra (calra) marked 3 inline comments as done.Feb 8 2021, 8:14 PM
Himanshi Kalra (calra) added inline comments.
blender_bot_helper.py
69

No, buildbot won't be affected, if its offline, the status will be logged in twistd.log file by default.

Brecht Van Lommel (brecht) requested changes to this revision.Feb 10 2021, 8:03 PM

Two more things I noticed:

  • The both user ID and token will need to read from master_private.py. master_private_template.py can be edited to have them. I'd also suggest changing the code so that when these values are empty, we don't try to send a message.
  • README.txt should be updated to indicate the requests module must be installed.

Beyond that, I think deploying this is up to @James Monteath (jmonteath), when he has time.

This revision now requires changes to proceed.Feb 10 2021, 8:03 PM
  • Addressed the comments.
  • Added requests lib to Readme, minor updates
This revision is now accepted and ready to land.Feb 11 2021, 2:23 PM

I have plans to do this type of notification eventually.

It would be best that we create new channels for automated bot notifications and let users join.
It will will get much to noisy in the coder channels.

I am currently setting up buildbot master and workers in multiple test environments and would prefer to apply any changes to those environments first and test.

@James Monteath (jmonteath) can you provide a more concrete time table on this?

I hope to have something for the 2.93 release, so in the next few weeks.
I have a DEVTEST build env setup in the studio and will push notifications to new channels for this purpose.
Let me know if anyone wants to be part of the testing notification channels.

ideally all devs, but for a trail run, sure sign me up!

This revision now requires review to proceed.Mar 26 2021, 5:16 PM