Skip to content

Commit 7037c22

Browse files
committed
feat: Hide sensitive flag until v0.2.0 implementation
1 parent 49c1b66 commit 7037c22

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

helm_values_manager/cli.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,22 @@ def add_value_config(
5353
),
5454
required: bool = typer.Option(False, "--required", "-r", help="Whether this configuration is required"),
5555
sensitive: bool = typer.Option(
56-
False, "--sensitive", "-s", help="Whether this configuration contains sensitive data"
56+
False,
57+
"--sensitive",
58+
"-s",
59+
help="Whether this configuration contains sensitive data (coming in v0.2.0)",
60+
hidden=True, # Hide from help text until v0.2.0
5761
),
5862
):
5963
"""Add a new value configuration with metadata."""
6064
try:
6165
command = AddValueConfigCommand()
66+
67+
# Add warning for sensitive flag until it's fully implemented
68+
if sensitive:
69+
HelmLogger.warning("Sensitive value support will be available in version 0.2.0. Flag will be ignored.")
70+
sensitive = False # Ignore the flag for now
71+
6272
result = command.execute(path=path, description=description, required=required, sensitive=sensitive)
6373
typer.echo(result)
6474
except Exception as e:

tests/integration/test_cli_integration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ def test_add_value_config_help_command(plugin_install):
9797
assert "--path" in stdout
9898
assert "--description" in stdout
9999
assert "--required" in stdout
100-
assert "--sensitive" in stdout
100+
# The sensitive flag is now hidden, so it shouldn't appear in help
101+
# assert "--sensitive" in stdout
101102

102103

103104
def test_add_value_config_command(plugin_install, tmp_path):
@@ -143,7 +144,6 @@ def test_add_value_config_command(plugin_install, tmp_path):
143144
second_path,
144145
"--description",
145146
second_description,
146-
"--sensitive",
147147
]
148148
)
149149

@@ -163,7 +163,7 @@ def test_add_value_config_command(plugin_install, tmp_path):
163163
assert second_config is not None
164164
assert second_config["description"] == second_description
165165
assert second_config["required"] is False
166-
assert second_config["sensitive"] is True
166+
assert second_config["sensitive"] is False
167167
assert second_config["values"] == {}
168168

169169

0 commit comments

Comments
 (0)