-
Notifications
You must be signed in to change notification settings - Fork 15
feat(cli): implement deploy dry-run mode with TDD and hexagonal architecture #479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
Implements SPEC-DEPLOY-DRY-RUN.md following TDD best practices, DDD principles, and hexagonal architecture patterns. ## Features - **Dry-Run Mode**: Preview deployment changes without executing - **Change Set Analysis**: Analyze CloudFormation changes before deployment - **Environment Validation**: Validate env vars and AWS credentials - **Template Generation**: Generate and preview serverless templates - **Impact Analysis**: Estimate downtime and breaking changes - **Multiple Output Formats**: Console (default) and JSON for CI/CD ## Architecture Follows hexagonal architecture with clear separation of concerns: - **Domain Layer**: Entities, value objects, services (business logic) - **Application Layer**: Use cases, ports (orchestration) - **Infrastructure Layer**: Adapters for AWS SDK, file system, reporting ## Usage ```bash # Preview deployment frigg deploy --dry-run # Preview with specific stage frigg deploy --stage prod --dry-run # JSON output for CI/CD frigg deploy --dry-run --output json # All existing flags work with dry-run frigg deploy --dry-run --verbose --skip-env-validation ``` ## Implementation Details - **381 tests** (all passing) with excellent coverage - Test-Driven Development: tests written before implementation - AWS SDK v3 with lazy-loading and proper error handling - Immutable value objects and entities - Self-documenting code with sparse comments - Follows existing infrastructure patterns ## Components Implemented **Domain Layer:** - Value Objects: ChangeSetSummary, ValidationResult, DryRunStatus - Entities: DryRunReport (aggregate root) - Services: PreFlightChecker, ChangeSetAnalyzer **Application Layer:** - Use Case: ExecuteDryRunUseCase (orchestrator) - Ports: IChangeSetCreator, IEnvironmentValidator, ITemplateGenerator **Infrastructure Layer:** - Adapters: CloudFormationChangeSetCreator, EnvironmentValidator, DryRunReporter, ServerlessTemplateGenerator, FileSystemAdapter 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Resolved conflict in deploy-command/index.js: - Integrated dry-run feature with latest next branch changes - Adopted improved skipHealthCheck logic from next branch - CLI moved to packages/devtools/frigg-cli (structural change from next)
…ter merge - CLI moved from packages/frigg-cli to packages/devtools/frigg-cli in next branch - Restored all 29 dry-run files to correct location - Tests need investigation - 9 test suites present but failing to run
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 22520632 | Triggered | Generic High Entropy Secret | 3de78eb | packages/core/credential/repositories/tests/credential-repository-documentdb-encryption.test.js | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
|




Overview
Implements
SPEC-DEPLOY-DRY-RUN.mdfollowing TDD best practices, DDD principles, and hexagonal architecture patterns.Adds
--dry-runflag tofrigg deploycommand to preview deployment changes without executing them.Features
Usage
Architecture
Follows hexagonal architecture (ports & adapters) with clear separation of concerns:
Implementation Details
Test Coverage
Components Implemented
Domain Layer:
ChangeSetSummary,ValidationResult,DryRunStatusDryRunReport(aggregate root)PreFlightChecker,ChangeSetAnalyzerApplication Layer:
ExecuteDryRunUseCase(orchestrator)IChangeSetCreator,IEnvironmentValidator,ITemplateGeneratorInfrastructure Layer:
CloudFormationChangeSetCreator,EnvironmentValidator,DryRunReporter,ServerlessTemplateGenerator,FileSystemAdapterAWS Best Practices
Code Quality
Testing
Test Coverage by Component
Breaking Changes
None. All changes are additive.
Migration Guide
No migration needed. New optional flag.
Related Issues/PRs
SPEC-CLEANUP-COMMAND.md(mentioned in spec)claude/investigate-deployment-issue-011CUQnhtGchP5yhseqHN7chChecklist