ansible-community / collection_bot

Fork of Ansibullbot for collections
GNU General Public License v3.0
5 stars 10 forks source link

Make repos configurable and support multiple repos per bot #7

Closed jillr closed 3 years ago

jillr commented 3 years ago
SUMMARY

This makes it easier for collection owners to run their own copy of the bot by making REPOS a config file parameter, rather than a hard coded value. Making repo_data a config file parameter is not covered by this change.

Support iterating over multiple repos in triage

Condense --repo and --collection, favoring --repo. I can't identify anything being done that necessitates these being different options.

Move original run() logic into a run_triage() method so that run() can interate over the self.repo list on each iteration of self.loop (from the defaulttriager) when daemonized.

Move some of the attributes and logic in triagers/ansible.py into a setup_repo() method to also accomodate multiple repo looping.

Also add config for a cloud collections bot and make some vars less universal.

Add USAGE.md guide with instructions on deploying an instance of the bot for collections owners.

ISSUE TYPE
COMPONENT NAME

ansibot

ADDITIONAL INFORMATION

Needs a bit more testing since I just fork-lifted this over from a branch I had of https://github.com/gundalow/ansibullbot/tree/collections. Would be good to start getting reviews/feedback sooner than later though.

jillr commented 3 years ago

@samdoran you're the main person I know who's familiar with the bot, don't know if you'd seen the collections fork though. Would like to get any feedback you have, or anyone else you would recommend to review.

jillr commented 3 years ago

this is not consistently working correctly yet but makes improvements to cache and shippable handling

jillr commented 3 years ago

Latest changeset works in --dry-run but need to remove labeling of affects_2.1x as that's not relevant to collections. This is a pretty drastic set of changes, I'm not yet sure if carving out shippable and ci handling like this will have other problematic effects.

jillr commented 3 years ago

Latest revision has been deployed to ansibullbot-cloud.eng.ansible.com and running against amazon.aws, community.aws, and community.vmware for a few days and is working well so far. ready_for_review

gundalow commented 3 years ago

Thanks to @dmsimard and @mkrizek work we've found a good way to bring collection_bot and ansibullbot back inline.

So this PR is superseded by https://github.com/ansible/ansibullbot/pull/1579

Cloud Team can continue to run their own bot (as it seems to work) till everything is good, then we can have a single bot instance for all collections.