Loading
Track gitea and github self hosted events
What does this MR do and why?
Adds source_hosting ('cloud' vs 'self_hosted') to the five project import lifecycle internal events for GitHub and Gitea imports:
start_project_importfinish_project_importfail_project_importcancel_project_importtimeout_project_import
This lets us distinguish SaaS (github.com, gitea.com) from self-hosted (GitHub Enterprise, self-hosted Gitea) migrations when analysing import volumes.
Implementation
Project#source_hostingreturns'cloud'/'self_hosted'for github/gitea imports,nilotherwise. It reuses the existingProject#github_enterprise_import?and a newProject#gitea_self_hosted_import?(mirrors the GitHub helper, compares againstgitea.com).ProjectImportState#track_project_import_eventincludessource_hostinginadditional_properties; the existing.compactdrops it for other importers.- Each of the five event YAMLs declares the new
source_hostingadditional property.
Scope
- Part of #617884.
- Closes #627874 (closed).
- Follows the pattern established in !253895 (merged) and !255888 (merged).
How to validate locally
- Enable Snowplow Micro:
gdk config set snowplow_micro.enabled true
gdk reconfigure
gdk restart- Monitor http://gdk.test:9091/micro/good.
- Trigger a GitHub or Gitea import (cloud and self-hosted). Confirm each of the five
*_project_importevents carriessource_hosting: cloudorsource_hosting: self_hosted, and that other importers (e.g. Bitbucket) do not carry the field.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #627874 (closed)