arc/docs/dist-git-move/toddlers.rst
Michal Konecny 8a4a7cc0e4 Remove CI topics from dist git investigation
These CI topics are not related to dist git, let's remove them.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-11-22 15:30:17 +00:00

98 lines
3.1 KiB
ReStructuredText

.. _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
~~~~~~~~~~~~~~~~~~
- ``/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