Repository: feast-dev/feast

Issue:
A CLI command to dump the actual configuration
**Is your feature request related to a problem? Please describe.**
Sometimes Feast applies default configurations when the user configuration is not completely provided.
To avoid misinterpretations, a `feast` CLI command could expose the actual configuration.

For example, if we provide the default configuration generated by `feast init`:
```yaml
project: foo
# By default, the registry is a file (but can be turned into a more scalable SQL-backed registry)
registry: data/registry.db
# The provider primarily specifies default offline / online stores & storing the registry in a given cloud
provider: local
online_store:
    type: sqlite
    path: data/online_store.db
entity_key_serialization_version: 2
# By default, no_auth for authentication and authorization, other possible values kubernetes and oidc. Refer the documentation for more details.
auth:
    type: no_auth
```
The actual configuration adds the offline config, which was not provided by the user:
```
> python
>>> from feast.feature_store import FeatureStore
>>> FeatureStore("foo/feature_repo").config
RepoConfig(project='foo', provider='local', registry_config='data/registry.db', online_config={'type': 'sqlite', 'path': 
'data/online_store.db'}, auth={'type': 'no_auth'}, offline_config='dask', batch_engine_config='local', feature_server=None, 
flags=None, repo_path=PosixPath('foo/feature_repo'), entity_key_serialization_version=2, coerce_tz_aware=True)
```

**Describe the solution you'd like**
Example of command to expose the actual configuration: `feast configuration`
Example of output:
```yaml
project: foo
registry: data/registry.db
provider: local
online_store:
    type: sqlite
    path: data/online_store.db
offline_store: 
    type: dask # Default config added by Feast
entity_key_serialization_version: 2
auth:
    type: no_auth
```

**Describe alternatives you've considered**
An SDK API to expose the same could be another option to access the actual config programmatically.



Discussion:
Hi, I would like to pick this up. Can this be assigned to me? Following this from the slack channel mentioning this as a good first issue. @lokeshrangineni 

I've been going through the feast documentation and source code for the past week. I would like to start contributing to this project as I have some free time in the last semester of my course



Patch:
diff --git a/docs/reference/feast-cli-commands.md b/docs/reference/feast-cli-commands.md
index 8f1a7c302e6..712df18a6b6 100644
--- a/docs/reference/feast-cli-commands.md
+++ b/docs/reference/feast-cli-commands.md
@@ -19,6 +19,7 @@ Options:
 
 Commands:
   apply                    Create or update a feature store deployment
+  configuration            Display Feast configuration
   entities                 Access entities
   feature-views            Access feature views
   init                     Create a new Feast repository
@@ -61,6 +62,28 @@ feast apply
 `feast apply` \(when configured to use cloud provider like `gcp` or `aws`\) will create cloud infrastructure. This may incur costs.
 {% endhint %}
 
+## Configuration
+
+Display the actual configuration being used by Feast, including both user-provided configurations and default configurations applied by Feast.
+
+```bash
+feast configuration
+```
+
+```yaml
+project: foo
+registry: data/registry.db
+provider: local
+online_store:
+    type: sqlite
+    path: data/online_store.db
+offline_store: 
+    type: dask 
+entity_key_serialization_version: 2
+auth:
+    type: no_auth
+```
+
 ## Entities
 
 List all registered entities
diff --git a/sdk/python/feast/cli.py b/sdk/python/feast/cli.py
index 165677a843a..890c79aa856 100644
--- a/sdk/python/feast/cli.py
+++ b/sdk/python/feast/cli.py
@@ -137,6 +137,24 @@ def version():
     print(f'Feast SDK Version: "{importlib_version("feast")}"')
 
 
+@cli.command()
+@click.pass_context
+def configuration(ctx: click.Context):
+    """
+    Display Feast configuration
+    """
+    repo = ctx.obj["CHDIR"]
+    fs_yaml_file = ctx.obj["FS_YAML_FILE"]
+    cli_check_repo(repo, fs_yaml_file)
+    repo_config = load_repo_config(repo, fs_yaml_file)
+    if repo_config:
+        config_dict = repo_config.model_dump(by_alias=True, exclude_unset=True)
+        config_dict.pop("repo_path", None)
+        print(yaml.dump(config_dict, default_flow_style=False, sort_keys=False))
+    else:
+        print("No configuration found.")
+
+
 @cli.command()
 @click.option(
     "--host",


Test patch:
diff --git a/sdk/python/tests/unit/cli/test_cli.py b/sdk/python/tests/unit/cli/test_cli.py
index a286c847dd2..b09eabebb80 100644
--- a/sdk/python/tests/unit/cli/test_cli.py
+++ b/sdk/python/tests/unit/cli/test_cli.py
@@ -170,3 +170,23 @@ def setup_third_party_registry_store_repo(
         )
 
         yield repo_path
+
+
+def test_cli_configuration():
+    """
+    Unit test for the 'feast configuration' command
+    """
+    runner = CliRunner()
+
+    with setup_third_party_provider_repo("local") as repo_path:
+        # Run the 'feast configuration' command
+        return_code, output = runner.run_with_output(["configuration"], cwd=repo_path)
+
+        # Assertions
+        assertpy.assert_that(return_code).is_equal_to(0)
+        assertpy.assert_that(output).contains(b"project: foo")
+        assertpy.assert_that(output).contains(b"provider: local")
+        assertpy.assert_that(output).contains(b"type: sqlite")
+        assertpy.assert_that(output).contains(b"path: data/online_store.db")
+        assertpy.assert_that(output).contains(b"type: file")
+        assertpy.assert_that(output).contains(b"entity_key_serialization_version: 2")