Skip to content

Commit 84a253a

Browse files
adamanciniclaude
andcommitted
docs: add Future Considerations section for replicated-actions integration
Document comprehensive plan for refactoring GitHub Actions workflow using official replicated-actions to replace custom composite actions. Includes detailed analysis of current state, proposed changes, implementation phases, and expected benefits. Key improvements would include: - Replace custom release creation with official create-release action - Use official create-customer and create-cluster actions - Simplify test deployment workflow - Enhance cleanup process with parallel operations - Reduce maintenance burden while improving reliability 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent bb442f1 commit 84a253a

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed

applications/wg-easy/CLAUDE.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,108 @@ Located in `.github/actions/` for consistent tool setup and operations:
460460
### Usage
461461
PR validation runs automatically on pull requests affecting `applications/wg-easy/`. Manual trigger available via `workflow_dispatch`.
462462

463+
## Future Considerations
464+
465+
### Refactoring PR Validation Workflow Using Replicated Actions
466+
467+
The current GitHub Actions workflow uses custom composite actions that wrap Task-based operations. The [replicated-actions](https://github.com/replicatedhq/replicated-actions) repository provides official actions that could replace several of these custom implementations for improved reliability and reduced maintenance burden.
468+
469+
#### Current State Analysis
470+
471+
The current workflow uses custom composite actions:
472+
- `./.github/actions/replicated-release` (uses Task + Replicated CLI)
473+
- `./.github/actions/test-deployment` (complex composite with multiple Task calls)
474+
- Custom cluster and customer management via Task wrappers
475+
476+
#### Proposed Refactoring Opportunities
477+
478+
##### 1. Replace Custom Release Creation
479+
**Current**: `./.github/actions/replicated-release` (uses Task + Replicated CLI)
480+
**Replace with**: `replicatedhq/replicated-actions/create-release@v1`
481+
482+
**Benefits:**
483+
- Official Replicated action with better error handling
484+
- Direct API integration (no Task wrapper needed)
485+
- Built-in airgap build support with configurable timeout
486+
- Outputs channel-slug and release-sequence for downstream jobs
487+
488+
##### 2. Replace Custom Customer Creation
489+
**Current**: `task customer-create` within test-deployment action
490+
**Replace with**: `replicatedhq/replicated-actions/create-customer@v1`
491+
492+
**Benefits:**
493+
- Direct customer creation without Task wrapper
494+
- Returns customer-id and license-id as outputs
495+
- Configurable license parameters (expiration, entitlements)
496+
- Better error handling and validation
497+
498+
##### 3. Replace Custom Cluster Management
499+
**Current**: `task cluster-create` and `task cluster-delete`
500+
**Replace with**:
501+
- `replicatedhq/replicated-actions/create-cluster@v1`
502+
- `replicatedhq/replicated-actions/remove-cluster@v1`
503+
504+
**Benefits:**
505+
- Direct cluster provisioning without Task wrapper
506+
- Returns cluster-id and kubeconfig as outputs
507+
- More granular configuration options (node groups, instance types)
508+
- Automatic kubeconfig export
509+
510+
##### 4. Enhance Cleanup Process
511+
**Current**: `task cleanup-pr-resources`
512+
**Replace with**: Individual replicated-actions for cleanup:
513+
- `replicatedhq/replicated-actions/archive-customer@v1`
514+
- `replicatedhq/replicated-actions/remove-cluster@v1`
515+
516+
**Benefits:**
517+
- More reliable cleanup using official actions
518+
- Better resource tracking via action outputs
519+
- Parallel cleanup operations possible
520+
521+
##### 5. Simplify Test Deployment Action
522+
**Current**: Large composite action with multiple Task calls
523+
**Refactor to**: Use replicated-actions directly in workflow
524+
525+
**Benefits:**
526+
- Reduced complexity and maintenance burden
527+
- Better visibility in GitHub Actions UI
528+
- Easier debugging and monitoring
529+
- Consistent error handling across all operations
530+
531+
#### Implementation Phases
532+
533+
**Phase 1: Release Creation Refactoring**
534+
- Replace `.github/actions/replicated-release` with direct use of `replicatedhq/replicated-actions/create-release@v1`
535+
- Update workflow to pass chart directory and release parameters directly
536+
- Test release creation functionality
537+
538+
**Phase 2: Customer and Cluster Management**
539+
- Replace customer creation in test-deployment with `create-customer@v1`
540+
- Replace cluster operations with `create-cluster@v1`
541+
- Update workflow to capture and pass IDs between jobs
542+
- Test customer and cluster provisioning
543+
544+
**Phase 3: Deployment Testing Simplification**
545+
- Break down test-deployment composite action into individual workflow steps
546+
- Use replicated-actions directly in workflow jobs
547+
- Maintain existing retry logic for cluster creation
548+
- Test end-to-end deployment flow
549+
550+
**Phase 4: Enhanced Cleanup**
551+
- Replace cleanup task with individual replicated-actions
552+
- Implement parallel cleanup using job matrices
553+
- Add proper error handling for cleanup failures
554+
- Test resource cleanup functionality
555+
556+
#### Expected Outcomes
557+
- **Reduced Maintenance**: Fewer custom actions to maintain
558+
- **Better Reliability**: Official actions with better error handling
559+
- **Improved Visibility**: Direct action usage in workflow logs
560+
- **Enhanced Features**: Access to advanced features like airgap builds
561+
- **Consistent API Usage**: All operations use official Replicated actions
562+
563+
This refactoring would maintain the current Task-based local development workflow while leveraging official actions for CI/CD operations, providing the best of both worlds.
564+
463565
## Additional Resources
464566

465567
- [Chart Structure Guide](docs/chart-structure.md)

0 commit comments

Comments
 (0)