Skip to content

Commit

Permalink
Update unfound secret return to os.environ
Browse files Browse the repository at this point in the history
  • Loading branch information
dangtony98 committed Aug 21, 2023
1 parent 89293f2 commit a72e48c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes will be documented in this file.

## [1.4.1] - 2023-07-13

This version updates returning unfound secrets to whatever is present on `os.environ` as opposed to returning `None`.

## [1.4.0] - 2023-07-13

This version adds support for folders or path-based secret storage for all secret CRUD operations.
Expand Down
2 changes: 1 addition & 1 deletion infisical/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.4.0"
__version__ = "1.4.1"
3 changes: 2 additions & 1 deletion infisical/services/secret_service.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from datetime import datetime
from typing import List

Expand Down Expand Up @@ -50,7 +51,7 @@ def populate_client_config(
def get_fallback_secret(secret_name: str) -> SecretBundle:
return SecretBundle(
secret_name=secret_name,
secret_value=None,
secret_value=os.environ[secret_name],
is_fallback=True,
last_fetched_at=datetime.now(),
)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_client/test_infisical_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def client():
infisical_client.create_secret("KEY_ONE", "KEY_ONE_VAL_PERSONAL", type="personal")
infisical_client.create_secret("KEY_TWO", "KEY_TWO_VAL")

# infisical_client.create_secret("TESTOO", "sssss", path="/foo", environment="dev")

yield infisical_client

infisical_client.delete_secret("KEY_ONE")
Expand Down

0 comments on commit a72e48c

Please sign in to comment.