Skip to content

Commit

Permalink
remove enable_snowgit feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pczajka committed Apr 8, 2024
1 parent 73571c8 commit 209f674
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 18 deletions.
1 change: 0 additions & 1 deletion src/snowflake/cli/api/feature_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ class FeatureFlag(FeatureFlagMixin):
ENABLE_STREAMLIT_EMBEDDED_STAGE = BooleanFlag(
"ENABLE_STREAMLIT_EMBEDDED_STAGE", False
)
ENABLE_SNOWGIT = BooleanFlag("ENABLE_SNOWGIT", True)
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from snowflake.cli.api.feature_flags import FeatureFlag
from snowflake.cli.plugins.connection import plugin_spec as connection_plugin_spec
from snowflake.cli.plugins.git import plugin_spec as git_plugin_spec
from snowflake.cli.plugins.nativeapp import plugin_spec as nativeapp_plugin_spec
Expand All @@ -21,8 +20,7 @@ def get_builtin_plugin_name_to_plugin_spec():
"snowpark": snowpark_plugin_spec,
"sql": sql_plugin_spec,
"streamlit": streamlit_plugin_spec,
"git": git_plugin_spec,
}
if FeatureFlag.ENABLE_SNOWGIT.is_enabled():
plugin_specs["git"] = git_plugin_spec

return plugin_specs
11 changes: 0 additions & 11 deletions tests/git/test_git_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ def test_toplevel_help(runner):
assert result.exit_code == 0, result.output


@mock.patch.dict("os.environ", {"SNOWFLAKE_CLI_FEATURES_ENABLE_SNOWGIT": "false"})
def test_not_visible_if_disabled(runner, monkeypatch):
result = runner.invoke(["--help"])
assert (
result.exit_code == 0
and "Manages git repositories in Snowflake." not in result.output
)
result = runner.invoke(["git", "--help"])
assert result.exit_code == 2 and "No such command 'git'" in result.output


@mock.patch("snowflake.connector.connect")
def test_list_branches(mock_connector, runner, mock_ctx):
ctx = mock_ctx()
Expand Down
3 changes: 0 additions & 3 deletions tests/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@ password = "dummy_password"

[connections.test_connections]
user = "python"

[cli.features]
enable_snowgit = true

0 comments on commit 209f674

Please sign in to comment.