nicoloboschi commented on code in PR #19004:
URL: https://github.com/apache/pulsar/pull/19004#discussion_r1054378260


##########
pulsar-io/debezium/core/src/main/java/org/apache/pulsar/io/debezium/DebeziumSource.java:
##########
@@ -60,11 +62,24 @@ public static String topicNamespace(SourceContext 
sourceContext) {
                 + (StringUtils.isEmpty(namespace) ? 
TopicName.DEFAULT_NAMESPACE : namespace);
     }
 
+    public static void tryLoadingConfigSecret(String secretName, Map<String, 
Object> config, SourceContext context) {
+        try {
+            String secret = context.getSecret(secretName);
+            if (secret != null) {
+                config.put(secretName, secret);
+            }
+        } catch (Exception e) {
+            log.warn("Failed to read secret {}", secretName);

Review Comment:
   print the exception ? 



##########
pulsar-io/debezium/core/src/main/java/org/apache/pulsar/io/debezium/DebeziumSource.java:
##########
@@ -60,11 +62,24 @@ public static String topicNamespace(SourceContext 
sourceContext) {
                 + (StringUtils.isEmpty(namespace) ? 
TopicName.DEFAULT_NAMESPACE : namespace);
     }
 
+    public static void tryLoadingConfigSecret(String secretName, Map<String, 
Object> config, SourceContext context) {
+        try {
+            String secret = context.getSecret(secretName);
+            if (secret != null) {
+                config.put(secretName, secret);

Review Comment:
   it's better to output that we've just overwritten the user config. This 
would also helps troubleshooting
   
   something like
   
   log.info("Config key {} set from secret", secretName)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to