We bumped the default nodeset to ubuntu-noble which bumped our python
version up to python3.12. We were previously pinning hacking to a
version that pulls in a version of flake8 that isn't compatible with
python3.12 due to entrypoint importlib_metadata compatibility issues.
We fix that by updating hacking to lastest, but that introduces a new
rule that requires we have whitespace after a return statement. We also
fix that in the one location that was a problem.
Then separately ssl.wrap_context has been removed in python 3.12 so we
switch that out with SSLContext.wrap_context instead when checking irc
access in the irc access check job.
Change-Id: Id4e3c6f35ffcf5cea302aa1bd8b126affa4eeb07
Make some adjustments to the IRC access check script so that it
works in the OFTC network now. Also update the channel config to
reflect the new ACL paradigms there. Remove our volunteer operators
temporarily until we can confirm their nicks there. Also rip out the
channel forwarding for unregistered nicks, we can work on readding
it there later if we determine it's necessary after all, but it will
need implementing differently anyway if so.
Change-Id: Ib3c43ef5ba22191d869629cd01d3800f3e235ea4
We have python scripts in the tools/ dir the vast majority of which we
run regularly with python3 via our python3 default basepython in tox.
However, most of these use a `python` shebang line which can be
confusing as to whether or not these scripts run under python3 or not.
To make this more clear set them to python3. I've confirmed the scripts
running under tox are happy with these changes. For the ones that don't
run under tox I've done a quick review and they look happy too.
Change-Id: I983d23c33f7780e5708aa728c829c3262fc99ea0
This version of hacking doesn't understand f-strings as usable in
Python 3. Update to the latest and fix current issues, which are all
just formatting fixes.
Change-Id: I0a7d6f93f07477b6dd29ab143130dd9064c250be
libyaml now needs to Loader keyword to not throw a warning, use
safe_load instead everywhere.
sort_keys isn't supported for reasons surpassing understanding, so
switch to ruamel.yaml for the places where we write contents back
out.
Our ruamel.yaml wrapper strips extra leading space, which is needed
when the root object is a list. When the root object is NOT a list,
it's not needed. Add a flag to the constructor to toggle the
behavior.
For gerrit/projects.yaml this leads to a different wrapping of
description fields, which is included here.
Let ruamel.yaml handle comments
Since we've switched to ruamel.yaml, we don't need to strip
comments. Stop stripping them. Intra-list comments aren't
supported, so just remove them.
Please don't ask me why we can't have a space before openstack-merlin.
Change-Id: I72776774eabd4e397ee5e8bdd58b3632be8fd3a1
When a channels is being removed according to [1], the access check will
currently loop forever trying to get information for that channel,
ignoring the
You are not authorized to perform this operation.
message that chanserv is sending. Instead we should fail on that
scenario.
[1]
https://docs.openstack.org/infra/system-config/irc.html#renaming-an-irc-channel
Depends-On: Ie7593223564b376f6bac072b7afc3449e90ea1f9
Change-Id: I1fe813c16b243bf78dcc6af9ff385cf77087c388
Two problems are corrected:
1) If a channel is not registered with chanserv, consider it an
access failure.
2) The failure flag was being reset on every successful private
message. That was intended to ensure that we failed if we were
unable to communicate with ChanServ. But the logic was flawed.
Correct this by treating the failure flag as trinary. On the
first channel where we have verified access is okay, set the flag
to indicate that we have not failed, iff the flag has not already
been set. So now either failure to communicate with ChanServ or
an actual access failure will cause it to exit 1.
Change-Id: I8d51b706ed6f499827f8046ab4522b342589cb90
Add new test that checks that channels mentioned in gerritbot are also
in accessbot.
Enhance the irc tox target so that it runs the checks, and update Zuul
so that the job is run for changes to gerritbot.
Add channels openstack-mistral and puppet-openstack to accessbot,
openstackinfra now has access to the channels. These two channels are
already in gerritbot.
Make check_irc_access.py script executable.
Change-Id: Ic68ba9a1c60854e68817fcadb1a5df2144944af7
Make the necessary changes for the jobs ported over from infra/config
to work in this repo.
Also, make the irc access job voting.
Add a .gitignore file.
Change-Id: If3b6c214881205a25e8148c23c3411338b66ef90