Add toddlers document for dist-git-move investigation

This adds the document for investigation of Toddlers interactions with dist-git.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
Michal Konecny 2023-11-01 16:10:06 +01:00 committed by zlopez
parent 7f2c87309d
commit ad656bd141
2 changed files with 99 additions and 0 deletions

View file

@ -45,6 +45,7 @@ Index
hotness
notifications
toddlers
Conclusions
----

View file

@ -0,0 +1,98 @@
.. _toddlers:
Pagure Dist Git Interactions With Toddlers
====
`Toddlers <https://pagure.io/fedora-infra/toddlers>`_ are used to run various small tasks
in Fedora Infrastructure. Keeping things synced and automating various tasks that were done
manually in the past. As that it has plenty of interactions with Dist Git.
Possible Interactions
----
The following are a set of documented interactions possible between Pagure Dist
Git and Toddlers.
Git module
^^^^
- Some of the toddlers are doing cloning and various interactions with git, all of those
interactions are in
`git module <https://pagure.io/fedora-infra/toddlers/blob/main/f/toddlers/utils/git.py>`_
Pagure module
^^^^
- This `module <https://pagure.io/fedora-infra/toddlers/blob/main/f/toddlers/utils/pagure.py>`_
contains method interacting with pagure or dist-git
- Few methods are specific only for dist-git:
* `set_monitoring_status`
* `is_project_orphaned`
* `assign_maintainer_to_project`
clean_retired_packages toddler
^^^^
- `/_dg/orphan` API endpoint called in `orphan_package` method
- `/_dg/bzoverrides` API endpoint called in `orphan_package` method
- `/<namespace>/<name>/git/modifyacls` API endpoint called in `remove_access` method
- `/<namespace>/<name>/watchers/update` API endpoint called in `remove_access` method
distgit_bugzilla_sync toddler
^^^^
- `/extras/pagure_poc.json` called in `_get_pagure_projects`
- `/extras/pagure_bz.json` called in `_get_pagure_projects`
flag_ci_pr toddler
^^^^
- Listening to following topics:
* `org.centos.*.ci.dist-git-pr.test.error`
* `org.centos.*.ci.dist-git-pr.test.complete`
* `org.centos.*.ci.dist-git-pr.test.running`
- `/api/0/<namespace>/<repo>/c/<commit_hash>/flag` called in `process` method
flag_commit_build toddler
^^^^
- `/api/0/<namespace>/<repo>/c/<commit_hash>/flag` called in `process` method
packagers_without_bugzilla toddler
^^^^
- `/extras/pagure_bz.json` called in `get_user_and_groups_dist_git` method
pdc_retired_packages toddler
^^^^
- `/<namespace>/<repo>/raw/<branch>/f/dead.package` called in `_is_retired_in_dist_git` method
pdc_unretire_packages toddler
^^^^
- `/<namespace>/<package_name>.git` called in `process_ticket` method
- `git clone` called in `process_ticket` toddler
Changes proposed
----
In order to switch out Pagure Dist Git for an alternative that provides a
relatively compatible API pattern, the following changes must be made in the
places mentioned below.
Necessary
^^^^
- The
`configuration <https://pagure.io/fedora-infra/ansible/blob/main/f/roles/openshift-apps/toddlers/templates/fedora-messaging.toml>`_
needs to be changed for dist-git to point to new URL
- The new dist-git solution needs to provide the API calls needed by toddlers
Unnecessary
^^^^
- Split
`pagure module <https://pagure.io/fedora-infra/toddlers/blob/main/f/toddlers/utils/pagure.py>`_
to dist-git and pagure module. This change will help us differentiate between those two
in the future