File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
estuary-cdk/estuary_cdk/capture
source-shopify-native/source_shopify_native Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
173174ConnectorState = GenericConnectorState [ResourceState ]
174175
You can’t perform that action at this time.
0 commit comments