Workspaces should have UI feedback when agent config file is invalid
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Hey Claude, can you look at this slack thread and suggest a few ideas
on improvements we could make to Workspaces? The ideas should be written
like a Requirements doc stored in a GitLab issue.
Background
Users are experiencing difficulties with GitLab Workspaces configuration, particularly around agent setup and validation. Key issues include:
- No validation of agent YAML config files before commit
- Lack of visibility into configuration errors
- Difficult debugging process for permissions and configuration issues
- Complex navigation through group hierarchies to find agent mappings
Problem Statement
Currently, users have no immediate feedback when their Workspaces configuration is invalid, leading to failed setups without clear error messages or remediation steps. The configuration process is git-based rather than UI-driven, making it impossible to validate inputs before commit. Additionally, the group hierarchy navigation and agent mapping visualization need improvement.
Proposed Solutions
1. Real-time Configuration Validation
Description: Implement real-time validation of Workspaces agent configurations with immediate feedback to users.
Requirements:
- Create an RPC endpoint in KAS (Kubernetes Agent Server) that Rails can call to validate configuration files
- Implement JSON schema validation for basic YAML structure verification
- Perform model validations on WorkspacesAgentConfig to provide specific error messages
- Display validation status and error messages in the UI wherever agent configurations are shown
- Add visual indicators (badges) to show config status (valid/invalid)
Acceptance Criteria:
- Users receive immediate feedback when viewing or editing agent configurations
- Error messages are specific and actionable (e.g., "dns_zone is an invalid domain" rather than generic errors)
- Validation status is visible in the agent list, workspace creation page, and agent authorization pages
- JSON schema validation prevents structural errors in the YAML file
2. Improved Agent Mapping Visualization
Description: Enhance the UX for viewing and managing agent mappings across group hierarchies.
Requirements:
- Create a hierarchical view of group agent mappings
- Show agent project origin and permissions clearly in the UI
- Implement a search/filter function for finding mapped agents
- Display agent status information alongside mapping information
- Add tooltips with complete agent details and required permissions
Acceptance Criteria:
- Users can easily locate mapped agents in their group hierarchy
- Agent origin and permissions are clearly visible without requiring hover actions
- Search functionality allows quick location of specific agents
- Status information helps identify configuration issues
3. Web UI-Based Configuration Interface
Description: Move Workspaces configuration from YAML files to a web-based UI interface.
Requirements:
- Create a dedicated Workspaces configuration section in the GitLab UI
- Implement form-based input for all agent configuration options
- Add real-time validation with immediate feedback
- Maintain version control of configurations through the UI
- Provide export/import functionality for configurations
Acceptance Criteria:
- All agent configuration options are available through the UI
- Form inputs are validated in real-time with clear error messages
- Configuration changes are version controlled
- Users can export configurations to YAML and import existing configurations
- UI prevents invalid configurations from being saved
Technical Constraints
- Must maintain backward compatibility with existing YAML-based configurations
- Should integrate with existing GitLab Agent for Kubernetes architecture
- Must respect existing permission models and security constraints
- Should support both UI-based and git-based configuration methods during transition
Success Metrics
- Reduction in support tickets related to agent configuration issues
- Decreased time to successfully set up a new Workspace
- Increased success rate of first-time Workspace configurations
- Positive user feedback on configuration process
- Reduced time spent debugging configuration issues
Out of Scope
- Changes to the underlying agent architecture
- Modifications to the existing permission model
- Integration with external validation services
- Automatic configuration fixes or suggestions
Dependencies
- KAS team availability for RPC endpoint implementation
- UX team input on interface design
- Frontend team capacity for UI implementation
- Backend team availability for validation logic
- Security team review of new configuration flow
Risks and Mitigations
Risks:
- User resistance to moving from git-based to UI-based configuration
- Performance impact of real-time validation
- Complexity in maintaining dual configuration methods
Mitigations:
- Maintain support for both configuration methods
- Implement validation caching and rate limiting
- Provide clear migration path and documentation