Task Management
Relevant source files
The following files were used as context for generating this wiki page:
Task Management in the Infrahub SDK ecosystem refers to the structured orchestration of development operations, automated CI/CD workflows, and feature-specific implementation tracking. It encompasses the use of the invoke automation tool for project lifecycle tasks and the use of technical task specifications to manage complex feature rollouts.
The system ensures consistency across the SDK through automated linting, documentation generation, and testing, while providing a roadmap for developers to implement features like Artifact Composition, Marketplace updates, and CLI enhancements.
Development Automation Tasks
The project uses invoke to manage common development workflows. These tasks automate formatting, linting, documentation generation, and schema management to maintain the SDK's integrity.
Workflow Orchestration
The primary entry point for automation is defined in tasks.py. It includes tasks for code quality, documentation, and repository maintenance.
Sources: tasks.py:196-267, tasks.py:313-324
Key Automation Tasks
| Task Name | Description | Source File |
|---|---|---|
format | Runs Ruff to format Python files and fix linting issues. | tasks.py:196-202 |
lint-code | Orchestrates Ruff, Ty, and Mypy to validate code type safety and style. | tasks.py:255-260 |
docs-generate | Generates CLI and SDK documentation using Typer and Mdxify. | tasks.py:46-50 |
schema-drift-check | Identifies differences between live Infrahub JSON schema and committed baseline. | tasks.py:327-349 |
lint-docs | Runs Rumdl and Vale to ensure documentation follows style guidelines. | tasks.py:263-267 |
Feature Implementation Tracking
Task management for specific feature implementation follows a phased approach documented in Markdown specifications. Each phase identifies dependencies, parallel execution opportunities, and specific story mapping.
Phase-Based Structure
Feature tasks are divided into logical phases to manage complexity and blocking prerequisites.
- Foundational Phase: Includes core infrastructure, exceptions, and trust models that all other tasks depend on.
- Implementation Phases: Grouped by User Story (US) or priority (P1-P5).
- Polish Phase: Covers documentation, final regression testing, and quality gates.
Sources: specs/infp-504-artifact-composition/tasks.md:15-27, specs/001-end-user-cli/tasks.md:27-38
Task Relationship and Execution Flow
The following diagram illustrates the dependency flow for a typical feature implementation (e.g., End-User CLI):
Quality Gates and Standards
Task management is governed by the "Infrahub Python SDK Constitution," which defines non-negotiable quality gates that must be satisfied before a task is considered complete.
Mandatory Compliance Gates
- Async/Sync Dual API Parity: Every public feature must ship on both
InfrahubClient(async) andInfrahubClientSync. - Test-First Development: Every bug fix or feature must include tests in the same change.
- Documentation Accuracy: Generated documentation must be updated via
invoke docs-generatewhenever signatures change.
Sources: dev/constitution.md:24-38, dev/constitution.md:113-125
Error Taxonomy in Tasks
For Marketplace and API-related tasks, a four-class taxonomy is used to classify errors during implementation:
- Invalid-input
- Not-found
- Version-not-found
- Network
Sources: specs/001-marketplace-api-update/tasks.md:46-52
Documentation Generation Flow
The SDK automates the generation of reference material for the Python SDK and the infrahubctl CLI. The tasks.py file defines the logic for discovering modules and converting them to MDX format.
Sources: tasks.py:144-177, tasks.py:53-81
Summary
Task Management provides the operational framework for developing the Infrahub SDK. By combining invoke-based automation with detailed feature task specifications and constitutional quality gates, the project ensures that development is predictable, well-documented, and compliant with architectural standards like async/sync parity and strict type safety.