Skip to content

Commit af22a91

Browse files
committed
Revert "feat: Improve add-deployment Command Tests and Coverage"
This reverts commit 52755c1.
1 parent 52755c1 commit af22a91

File tree

16 files changed

+8
-791
lines changed

16 files changed

+8
-791
lines changed

docs/ADRs/006-helm-style-logging.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ class HelmLogger:
3131
if args:
3232
msg = msg % args
3333
print("Error: %s" % msg, file=sys.stderr)
34-
35-
@staticmethod
36-
def warning(msg: str, *args: Any) -> None:
37-
if args:
38-
msg = msg % args
39-
print("Warning: %s" % msg, file=sys.stderr)
4034
```
4135

4236
### 2. Key Design Decisions
@@ -45,7 +39,6 @@ class HelmLogger:
4539
- Use stderr for all output
4640
- Prefix debug messages with "[debug]"
4741
- Prefix error messages with "Error:"
48-
- Prefix warning messages with "Warning:"
4942
- Control debug output via HELM_DEBUG environment variable
5043

5144
2. **Performance Optimization**
@@ -74,7 +67,6 @@ def some_function():
7467
logger.debug("Success!")
7568
except Exception as e:
7669
logger.error("Failed: %s", str(e))
77-
logger.warning("Something unexpected happened")
7870
```
7971

8072
## Consequences
@@ -103,7 +95,7 @@ def some_function():
10395
### Negative
10496
1. **Limited Flexibility**
10597
- Fixed output format
106-
- Limited log levels (debug/warning/error)
98+
- No log levels beyond debug/error
10799
- No log file support
108100

109101
2. **Global State**
@@ -121,12 +113,6 @@ def test_debug_output():
121113
mock.patch('helm_values_manager.utils.logger.sys.stderr', stderr):
122114
logger.debug("Test message")
123115
assert stderr.getvalue() == "[debug] Test message\n"
124-
125-
def test_warning_output():
126-
stderr = StringIO()
127-
with mock.patch('helm_values_manager.utils.logger.sys.stderr', stderr):
128-
logger.warning("Test warning")
129-
assert stderr.getvalue() == "Warning: Test warning\n"
130116
```
131117

132118
2. **Integration**
@@ -136,5 +122,4 @@ def validate(self):
136122
logger.debug("Validating PathData for path: %s", self.path)
137123
if not self.is_valid():
138124
logger.error("Invalid PathData: %s", self.path)
139-
logger.warning("PathData validation completed with warnings")
140125
```

docs/ADRs/011-command-structure-for-deployments.md

Lines changed: 0 additions & 83 deletions
This file was deleted.

docs/ADRs/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,3 @@ For new ADRs, use the [ADR template](adr-template.md) as a starting point.
7878
- **Decision**: Implement configuration comparison and smart merging with multiple strategies
7979
- **Impact**: Simplifies configuration updates and reduces risk of missing required changes
8080
- **Dependencies**: ADR-001
81-
82-
### [ADR-011: Command Structure for Deployments and Backends](011-command-structure-for-deployments.md)
83-
- **Status**: Accepted
84-
- **Context**: Need for intuitive command structure for managing deployments with multiple backends and auth types
85-
- **Decision**: Implement nested subcommand structure for deployment, backend, and auth configuration
86-
- **Impact**: Improves user experience, discoverability, and maintainability
87-
- **Dependencies**: ADR-001

docs/Design/backends-and-auth.md

Lines changed: 0 additions & 188 deletions
This file was deleted.

docs/Design/low-level-design.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -174,31 +174,6 @@ Benefits:
174174
- Automatic file locking
175175
- Configuration backup support
176176

177-
#### Command Structure for Deployments and Backends
178-
179-
The command structure for managing deployments and backends follows a nested subcommand pattern (see [ADR-011](../ADRs/011-command-structure-for-deployments.md)):
180-
181-
```
182-
helm values add-deployment [name]
183-
184-
helm values add-backend [backend] --deployment=[name] [backend_options]
185-
- helm values add-backend aws --deployment=prod --region=us-west-2
186-
- helm values add-backend azure --deployment=prod --vault-url=https://myvault.vault.azure.net
187-
- helm values add-backend gcp --deployment=prod --project-id=my-project
188-
- helm values add-backend git-secret --deployment=prod
189-
190-
helm values add-auth [auth_type] --deployment=[name] [auth_options]
191-
- helm values add-auth direct --deployment=prod --credentials='{...}'
192-
- helm values add-auth env --deployment=prod --env-prefix=AWS_
193-
- helm values add-auth file --deployment=prod --auth-path=~/.aws/credentials
194-
- helm values add-auth managed-identity --deployment=prod
195-
```
196-
197-
This structure:
198-
- Separates the concerns of creating a deployment, configuring a backend, and setting up authentication
199-
- Uses subcommands to provide context-specific options and help text
200-
- Follows a natural workflow of first creating a deployment, then adding backend and auth configuration
201-
202177
### 4. Storage Backends
203178

204179
The `ValueBackend` interface defines the contract for value storage:
@@ -227,8 +202,6 @@ Implementations:
227202
- Azure Key Vault Backend
228203
- Additional backends can be easily added
229204

230-
For a comprehensive overview of supported backends, authentication types, and backend configurations, see [Backends and Authentication Types](backends-and-auth.md).
231-
232205
### 5. Schema Validation
233206

234207
The configuration system uses JSON Schema validation to ensure data integrity and consistency:

0 commit comments

Comments
 (0)