Skip to content

Commit 844a61f

Browse files
committed
commit from vm
1 parent f446f79 commit 844a61f

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

estuary-cdk/estuary_cdk/capture/base_capture_connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ async def _encrypt_config(
164164
config: EndpointConfig,
165165
) -> dict[str, Any]:
166166
assert isinstance(config, BaseModel)
167-
ENCRYPTION_URL = "https://config-encryption.estuary.dev/v1/encrypt-config"
167+
ENCRYPTION_URL = "http://localhost:8765/v1/encrypt-config"
168168

169169
# mode="json" converts Python-specific concepts (like datetimes) to valid JSON.
170170
# include=config.model_fields_set ensures only the fields that are explicitly set on the

source-shopify-native/source_shopify_native/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ async def open(
215215

216216
# Persist migrated config so UI shows the new format
217217
if config._was_migrated:
218-
log.info("Persisting migrated config to multi-store format")
218+
log.info("Persisting migrated config to multi-store format", extra={"config": config})
219219
encrypted_config = await self._encrypt_config(log, config)
220+
log.info("Persisting migrated config to multi-store format", extra={"encrypted_config": encrypted_config})
220221
log.event.config_update(
221222
"Migrating legacy single-store config to multi-store format.",
222223
encrypted_config

source-shopify-native/source_shopify_native/models.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,16 @@ def transform_legacy_config(cls, data: Any) -> Any:
149149
150150
Sets _was_migrated flag so the connector can persist the new format.
151151
"""
152+
import logging
153+
logger = logging.getLogger("source-shopify-native:models:EndpointConfig:transform_legacy_config")
154+
152155
if not isinstance(data, dict):
156+
logger.debug("Config data is not a dict; skipping migration.", extra={"data": data})
153157
return data
154158

155159
# Already in new format or missing required legacy fields
156160
if "stores" in data or "store" not in data or "credentials" not in data:
161+
logger.debug("Config data is already in new format or missing legacy fields; skipping migration.", extra={"data": data})
157162
return data
158163

159164
# Transform legacy format to new format
@@ -162,13 +167,9 @@ def transform_legacy_config(cls, data: Any) -> Any:
162167
data["stores"] = [{"store": store, "credentials": credentials}]
163168
data["_was_migrated"] = True
164169

165-
return data
166-
167-
def __init__(self, **data: Any) -> None:
168-
was_migrated = data.pop("_was_migrated", False)
169-
super().__init__(**data)
170-
self._was_migrated = was_migrated
170+
logger.info("Migrated legacy config to new stores format.", extra={"data": data})
171171

172+
return data
172173

173174
ConnectorState = GenericConnectorState[ResourceState]
174175

0 commit comments

Comments
 (0)