tasks ready

This commit is contained in:
2026-01-22 23:59:16 +03:00
parent 26ba015b75
commit e9d3f3c827
13 changed files with 776 additions and 21 deletions

View File

@@ -22,16 +22,16 @@
### User Story 1 - Configure Git Server Connection (Priority: P1)
A dashboard developer needs to connect the system to their GitLab server to enable version control for dashboard development. They want to configure the Git server URL, authentication credentials, and repository details through a simple form interface.
A dashboard developer needs to connect the system to their Git server (GitLab, GitHub, or Gitea) to enable version control for dashboard development. They want to configure the Git server provider, URL, authentication credentials, and repository details through a simple form interface.
**Why this priority**: This is the foundational requirement - without Git server configuration, no other Git functionality can work. It's the entry point for all Git operations.
**Independent Test**: Can be fully tested by configuring a GitLab server connection and verifying the connection test succeeds, delivering the ability to establish Git server connectivity.
**Independent Test**: Can be fully tested by configuring a Git server connection (e.g., GitHub) and verifying the connection test succeeds, delivering the ability to establish Git server connectivity.
**Acceptance Scenarios**:
1. **Given** a user is on the Git integration settings page, **When** they enter valid GitLab server URL and API token, **Then** the system successfully validates the connection
2. **Given** a user enters invalid GitLab credentials, **When** they test the connection, **Then** the system displays a clear error message indicating authentication failure
1. **Given** a user is on the Git integration settings page, **When** they select a provider (GitLab/GitHub/Gitea) and enter valid server URL and PAT, **Then** the system successfully validates the connection
2. **Given** a user enters invalid Git credentials, **When** they test the connection, **Then** the system displays a clear error message indicating authentication failure
3. **Given** a user has configured a Git server, **When** they save the settings, **Then** the configuration is persisted and can be retrieved later
---
@@ -113,25 +113,28 @@ A dashboard developer needs to view the commit history and changes made to dashb
## Clarifications
### Session 2026-01-18
- Q: What is the primary data format for storing dashboards in the Git repository? → A: YAML files (more human-readable for diffs)
- Q: How should the system handle merge conflicts during synchronization? → A: Built-in UI for basic resolution (Mine/Theirs/Manual)
### Session 2026-01-22
- Q: Что именно должно входить в состав данных дашборда в Git-репозитории? → A: Распакованный архив экспорта Superset (YAML файлы: метаданные, чарты, датасеты, базы данных).
- Q: Какова структура хранения дашбордов в Git-репозитории? → A: Один репозиторий соответствует одному дашборду.
- Q: Как должен происходить деплой на целевое окружение после коммита? → A: Импорт через API (Superset Import API).
- Q: Как система должна обрабатывать конфликты слияния (merge conflicts)? → A: UI для выбора версии (Keep Mine / Keep Theirs) на уровне файлов.
- Q: Как должен происходить выбор дашборда для работы с Git? → A: Выбор конкретного дашборда из списка в UI.
- Q: What triggers a deployment to a target environment? → A: Manual trigger by user from UI
- Q: How should the system handle authentication with GitLab? → A: Personal Access Token (PAT)
- Q: What should be the scope of a "Dashboard" in the Git repository? → A: Directory per dashboard (metadata + assets)
- Q: How should the system handle authentication for the different providers (GitHub, GitLab, Gitea)? → A: Option [A] - Personal Access Token (PAT) for all providers
### Functional Requirements
- **FR-001**: System MUST allow users to configure Git server connection settings including server URL, authentication via Personal Access Token (PAT), and repository details
- **FR-002**: System MUST support GitLab as the primary Git server with extensible architecture for other Git servers
- **FR-003**: System MUST validate Git server connection using the provided PAT before saving configuration
- **FR-001**: System MUST allow users to configure Git server connection settings including provider type (GitHub, GitLab, Gitea), server URL, authentication via Personal Access Token (PAT), and repository details
- **FR-002**: System MUST support GitLab, GitHub, and Gitea as supported Git server providers
- **FR-003**: System MUST validate Git server connection using the provided PAT for the selected provider before saving configuration
- **FR-004**: Users MUST be able to view all available branches from the configured Git repository
- **FR-005**: Users MUST be able to create new branches both locally and remotely with proper naming validation
- **FR-006**: Users MUST be able to switch between existing branches and have dashboard content update accordingly
- **FR-007**: System MUST allow users to commit dashboard changes with commit messages and optional file selection
- **FR-008**: System MUST support pushing local commits to remote repository branches
- **FR-009**: System MUST support pulling changes from remote repository to local working directory
- **FR-010**: System MUST handle merge conflicts with a built-in UI providing "Keep Mine", "Keep Theirs", and "Manual Edit" resolution options
- **FR-010**: System MUST handle merge conflicts with a built-in UI providing "Keep Mine", "Keep Theirs", and "Manual Edit" (via a text area editor for YAML content) resolution options
- **FR-011**: Users MUST be able to configure multiple target environments for dashboard deployment
- **FR-012**: System MUST allow users to manually trigger deployment to a selected target environment from the UI
- **FR-013**: System MUST validate deployment configuration before initiating deployment process
@@ -140,7 +143,7 @@ A dashboard developer needs to view the commit history and changes made to dashb
- **FR-016**: System MUST display detailed changes included in each commit for audit purposes
- **FR-017**: System MUST handle PAT expiration gracefully with re-authentication prompts
- **FR-018**: System MUST provide offline mode functionality when Git server is unavailable
- **FR-019**: System MUST validate dashboard files before committing to ensure they are properly formatted in YAML within their respective dashboard directories
- **FR-019**: System MUST store and validate dashboard data as a standard unpacked Superset export (YAML files for dashboard metadata, charts, datasets, and database connections) within their respective directories.
- **FR-020**: Users MUST be able to search and filter commit history by date, author, or message content
- **FR-021**: System MUST support rollback functionality to previous dashboard versions via Git operations
@@ -151,16 +154,12 @@ A dashboard developer needs to view the commit history and changes made to dashb
- **Commit**: Represents a Git commit with properties like commit hash, author, timestamp, commit message, and list of changed files
- **Environment**: Represents a deployment target environment with properties like name, URL, authentication details, and deployment status
- **DashboardChange**: Represents changes made to dashboard directories (YAML metadata + assets) including file paths, change type (add/modify/delete), and content differences
- **Branch**: Represents a Git branch with properties like name, commit hash, last updated timestamp, and remote tracking status
- **Commit**: Represents a Git commit with properties like commit hash, author, timestamp, commit message, and list of changed files
- **Environment**: Represents a deployment target environment with properties like name, URL, authentication details, and deployment status
- **DashboardChange**: Represents changes made to dashboard files (YAML format) including file paths, change type (add/modify/delete), and content differences
## Success Criteria *(mandatory)*
### Measurable Outcomes
- **SC-001**: Users can successfully configure a GitLab server connection and validate it within 2 minutes
- **SC-001**: Users can successfully configure a supported Git server connection (GitLab, GitHub, or Gitea) and validate it within 2 minutes
- **SC-002**: Dashboard branch switching operations complete within 5 seconds for repositories with up to 100 commits
- **SC-003**: Commit and push operations succeed in 95% of attempts under normal network conditions
- **SC-004**: Deployment to target environments completes successfully within 30 seconds for standard dashboard configurations