Skip to content

Update SERVICE_MAPPING to support Forgejo dist-git #997

Description

@betulependule

ogr's get_service_class_or_none method, which is expected to return the appropriate Service class instance based on a given hostname, needs updating in order to support the migration of dist-git. Right now, src.fedoraproject.org is mapped to PagureService. However, once the migration of dist-git takes place, this hostname should instead correspond to ForgejoService.

I asked the team working on the migration and they said they plan to migrate all repos at once, so the migration shouldn't be gradual per-repo (as is the case with Fedora Forge). This is still worth verifying before the migration takes place in case there is a change of plans so that we can coordinate with their team to make sure Packit's transition to Forgejo dist-git support is smooth.

Whether Packit supports Pagure or Forgejo as dist-git relies on SERVICE_MAPPING, which is hardcoded, meaning we would need to release ogr with these changes at the same time that the switch of dist-git takes place, which would be difficult to coordinate and there would be a delay. It would be ideal to figure out a way we can make this transition smooth on Packit's side.

An automatic solution that would probe the dist-git backend that would determine whether to use PagureService or ForgejoService wouldn't be very clean and would introduce unnecessary behavioral changes and API calls, so instead, the goal is to make a clean update of the static service mapping and release it after the migration of dist-git.

Dist-git URLs are currently used as default values of some attributes in PagureService. These should be replaced / removed.

TODO:

  • Update SERVICE_MAPPING to map the appropriate hostnames to ForgejoService
  • Remove dist-git URLs from PagureService
  • Update tests (some will start to fail after changing the mapping)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions