Run script generate-gitmodules.py to sync with governace repository to
add new repositories and remove retired ones.
Change-Id: Ia42b717ad242958ba4a9689ac814c956f460712f
* Update gerritbot from branch 'master'
- Build docker images
So that we can deploy gerritbot in the new world of ansible+docker,
we need container images. Build and publish some.
Change-Id: I3b8a9f7d28af0f9098cfb73051976d7666a46a3c
* Update gerritbot from branch 'master'
- Update for python3
We're gonna build an image in the next patch, so let's fix things
up to be python3 ready.
Change-Id: Ia0e1ecf75e6593a7e7be9dc962a1e2f3dc23fe27
* Update gerritbot from branch 'master'
- Fix event comment-added
This change fixes the comment-added message sending to filter by the
event type which gerrit is now sending (Verified and Code-Review)
Adding the following to project-config/gerritbot/channels.yaml will
restore the previous functionality of sending messages for Verified,
Code-Review +2 and -2:
events:
- comments-added
- x-vrif-minus-2
- x-vrif-plus-2
- x-crvw-minus-2
- x-crvw-plus-2
Additionally, specifying 'comments-added' will send a message for
*every* gerrit comment, so the only way to get messages for
x-vrif-plus-2 (for example) is to also receive a firehose of every
gerrit comment.
To make this more configurable, the event type x-all-comments has been
added, which is now required in combination with 'comments-added' to
send a message for every gerrit comment:
events:
- comments-added
- x-all-comments
Change-Id: I9971e045c3416b300d1fd4683a2c145afef3d44f
- OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:
http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.htmlhttp://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html
Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
* Update gerritbot from branch 'master'
- Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.
This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.
This update should result in no functional change.
For more information see the thread at
http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html
Change-Id: I50e662774e52e6f1c82f7129d7e9eb0ab7cf2af6
- Don't autojoin channels
Don't pass the channels list to super in the irc bot class init method
because this appears to cause autojoining to happen which breaks because
we have too many channels. Instead let the event driven processing join
and part channels as needed to make the least recently used channel
rotation with channel limit work.
Change-Id: I447e75e84526d08fb9ec88eaae9a90f950dc5349
- Identify with SASL
Identify through SASL using the convenient ib3 mixins, and
get rid of a bunch of special-case code in the process.
This helps when dealing with channels set to require identified
users, as otherwise channel joins will race NickServ's processing of
the identify message and some channels will end up not serviced by
the bot (an alternative would be to delay joining channels until the
identify success is confirmed, but the implementation for that looks
like it would be at least as complex).
Change-Id: I1a01eed8102b59818df247a93fbe4bf50148e76a
Co-Authored-By: Thierry Carrez <thierry@openstack.org>
Depends-On: https://review.openstack.org/608313
* Update gerritbot from branch 'master'
- Support regexes in channel config yaml
With this change, the channel config yaml file can now be configured to
support regular expressions.
Any value in any section may be prefixed with `^` to denote that it is
to be treated as a regular expression [1]. Start and end ^anchors$ are
implicit (so add `.*` if needed).
For example, given the following paragraph in the channel config yaml:
openstack-foo:
events:
- patchset-created
- change-merged
projects:
- openstack/foo
- ^openstack/foo-.*
- openstack/oslo.foo
branches:
- master
- ^stable/(newton|ocata|pike)
...messages will be posted to #openstack-foo for events coming in from
project openstack/foo, openstack/foo-one, openstack/foo-bar, etc.; on
branches master, stable/newton, stable/ocata, or stable/pike.
Behavior is unchanged for values not prefixed with `^`.
[1] This paradigm cribbed from gerrit's search functionality:
https://review.openstack.org/Documentation/user-search.html#path
Change-Id: I97cb8faa72600bd1bd9792bb6bb59a3b652ec389
* Update gerritbot from branch 'master'
- Test Gerrit message filtering
Enhance the tests introduced in [1] to exercise the filtering logic in
the Gerrit class.
[1] https://review.openstack.org/#/c/545128/
Change-Id: Ib4ecd9e7ee233378f25d585f016ba1448b9e8797
* Update gerritbot from branch 'master'
- Add more unit tests including testing of Gerrit() class
* Add some additional unit tests, including the initial framework to
be able to test the Gerrit() class.
* Improve the readability of the code by using more descriptive
variable names.
* Migrate to using '.stestr.conf' instead of '.testr.conf'. This
removes warning message that was being displayed.
Change-Id: I596c4ccb9fe37d996de26089eefd8481a12ff13b
* Update gerritbot from branch 'master'
- Add unit test framework and one unit test
Add an initial unit test framework and one unit test. This way we can
ask people to add unit tests when they contribute code.
Change-Id: If52976e1992945a8e38af3cbad5b5f4389922d4c
Project: openstack-infra/gerritbot 033a83b870dcd2f31d557f514b31e60a073b4945
For patch submitted/merged, announce the branch
When announcing that a patch has been submitted or merged, also announce
the branch that the patch is against.
Change-Id: I5b325951bdc1b0fca37d8579a14747a4da3b558e
Project: openstack-infra/gerritbot 91d908b807c94bc20498232afce63aa4125215fa
Treat channels as an LRU list
Freenode has a limit of 120 channels joined by a single connection.
Since some of the channels Gerritbot reports to are less active
than others, have it only join channels when it needs to send a
message. If it has joined the max number of channels, part from
the least recently used channel to make room to join a new one.
Change-Id: Ifafeed77e640bc7b5910251c619358a8a2bd78a6
Project: openstack-infra/gerritbot 7c6e57983d499b16b3fabb864cf3bd5cfea8ab63
Add gerrit stream over MQTT support to gerritbot
With the start of the germqtt project and it being deployed on
firehose.openstack.org services listening to gerrit no longer need
to connect via ssh to get the event stream. This commit adds support
for using an mqtt event stream as the input into gerritbot.
Change-Id: I4130edac746ab7ae979cad5e3ccad3be0321c909
Project: openstack-infra/gerritbot d48b1bc41717291e43425ff437d6214b6934f60f
Fix reconnection method
The reconnect method is on the connection object, not the bot or
client objects.
See http://paste.openstack.org/show/481770/
Change-Id: I14856c0c451e51973e9b062cb9b4f35362cb3766
Project: openstack-infra/gerritbot f907ae705428de156bd60916e2241da022fdfcd3
Add a log entry to the debug log on config error
Recently a config problem broke gerritbot's ability to start, but what's
worse, there was no logging about why. Log the exception when this
happens.
Change-Id: If7832cbe5cbf5f506d5dfbb849f05f2e7670a2df
Project: openstack-infra/gerritbot 957981e7d8ecb584523cc98211bd5fce2929bf21
Replace ci.o.o links with docs.o.o/infra
The http://ci.openstack.org/ documentation site has been deprecated,
replaced by redirects to corresponding paths within
http://docs.openstack.org/infra/ where other Project Infrastructure
documentation already resides.
Change-Id: Icb976e2ec63dd8bcbb5890353ff980a4013d9a8a
Project: openstack-infra/gerritbot 506aea90100c4578ae468807f8b364206af311e5
Replace six.iteritems with iter()
We don't need six for this.
Change-Id: I19673bf47ef74b5e67c4197d31600c73c025ab4c
Project: openstack-infra/gerritbot 485174224404bdc1d0990a038fb82623d84ef524
Update to modern pbr
d2to1 hasn't been a thing in a VERY long time. We have to update hacking
as well beause the hacking this depends on also depends on a very old
pbr.
Change-Id: I1bf97a5fe1c1ae10f951510c2b95d43b4e9b8b19