Skip to content

Commit 3b4839c

Browse files
authored
Fix: Exclude private key from the state sync fingerprint calculation (#2704)
1 parent 04f4ae8 commit 3b4839c

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

sqlmesh/core/config/scheduler.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,30 @@ def state_sync_fingerprint(self, context: GenericContext) -> str:
9797
state_connection = (
9898
context.config.get_state_connection(context.gateway) or context._connection_config
9999
)
100-
return md5([state_connection.json(sort_keys=True)])
100+
return md5(
101+
[
102+
state_connection.json(
103+
sort_keys=True,
104+
exclude={
105+
"access_token",
106+
"concurrent_tasks",
107+
"user",
108+
"password",
109+
"keytab",
110+
"keyfile",
111+
"keyfile_json",
112+
"pre_ping",
113+
"principal",
114+
"private_key",
115+
"private_key_passphrase",
116+
"private_key_path",
117+
"refresh_token",
118+
"register_comments",
119+
"token",
120+
},
121+
)
122+
]
123+
)
101124

102125

103126
class BuiltInSchedulerConfig(_EngineAdapterStateSyncSchedulerConfig, BaseConfig):

0 commit comments

Comments
 (0)