Skip to content

Commit 1629afd

Browse files
authored
Merge pull request #410 from AGhafaryy/lazyloaded-args
adding logging and removing only_one arg
2 parents fb4c8ed + e7d8975 commit 1629afd

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

nodestream/pipeline/object_storage.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import base64
22
import hashlib
33
import hmac
4+
import logging
45
import pickle
56
from abc import ABC, abstractmethod
67
from dataclasses import dataclass
@@ -13,6 +14,9 @@
1314
from ..subclass_registry import SubclassRegistry
1415
from .extractors.credential_utils import AwsClientFactory
1516

17+
logger = logging.getLogger(__name__)
18+
19+
1620
OBJECT_STORE_REGISTRY = SubclassRegistry(ignore_overrides=True)
1721
T = TypeVar("T")
1822

@@ -248,6 +252,9 @@ def delete(self, key: str):
248252
class NullObjectStore(ObjectStore, alias="null"):
249253
"""An object store that does not store any objects."""
250254

255+
def __init__(self):
256+
logger.error("Using null ObjectStore. No persistence is configured.")
257+
251258
def get(self, _: str) -> Optional[bytes]:
252259
return None
253260

nodestream/project/storage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def to_file_data(self):
2626
name=self.name,
2727
type=self.storage_type,
2828
hmac_key=self.hmac_key,
29-
**self.arguments
29+
**self.arguments,
3030
)
3131

3232
@staticmethod
@@ -46,7 +46,7 @@ def describe_yaml_schema():
4646
{
4747
"name": str,
4848
"type": str,
49-
Optional("hmac_key"): Or(LazyLoadedArgument, str, only_one=True),
49+
Optional("hmac_key"): Or(LazyLoadedArgument, str),
5050
Optional(str): object,
5151
}
5252
)

0 commit comments

Comments
 (0)