How netcracker/qubership-git-system-follower works
Project Overview and Components
• This project is a Python-based package manager dedicated to Git providers (with a strong focus on GitLab). It automates the management of repository branch content—specifically handling installation, update, and removal of “gears” (i.e. Git packages).
• The architecture centers on several major parts:
• The Command Line Interface (CLI) layer (found in modules like git_system_follower/cli.py and related plugins) where users or automation tools invoke commands.
• The Core Package Management subsystem (in git_system_follower/package) that handles operations such as installation, updates, rollbacks, and removal of package configurations.
• The API Abstraction Layer (in git_system_follower/git_api) that encapsulates communications with external Git providers – currently tailored for GitLab.
• The Developer Interface (in git_system_follower/develop) and associated modules (api, cicd_variables, templates, types) that assist package developers in defining custom behaviors for gear installation and migrations.
• Supporting utilities (in git_system_follower/utils and logger) for retries, temporary directories, output formatting, and logging.
• Plugin infrastructure (in git_system_follower/plugins) that allows for CLI extension points, thereby enabling dynamic command execution or configuration adjustments.
• External state management using a designated file (the .state.yaml mentioned in the README) to persist the current state and hash values to verify the integrity of changes.
Analyzing the File Structure for Architectural Patterns
• The organization into directories such as “git_system_follower” and its submodules (“develop”, “git_api”, “package”, “plugins”, “utils”) suggests a modular design with separation of concerns.
• The “docs” directory is rich with API and CLI references, concepts, and how-to guides; use it as a reference for core functionality and integration points to external systems.