Skip to content

Commit 31785e0

Browse files
vssakuruZombieSud
andauthored
[FLINK-38035][Python][PythonEnvUtils] Redact sensitive env vars in PythonEnvUtils logging (#26803)
Co-authored-by: Rahul Sud <rahul.sud@gmail.com>
1 parent 6b0426c commit 31785e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flink-python/src/main/java/org/apache/flink/client/python/PythonEnvUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import org.apache.flink.client.deployment.application.UnsuccessfulExecutionException;
2222
import org.apache.flink.configuration.ConfigConstants;
23+
import org.apache.flink.configuration.ConfigurationUtils;
2324
import org.apache.flink.configuration.ReadableConfig;
2425
import org.apache.flink.core.fs.Path;
2526
import org.apache.flink.python.util.PythonDependencyUtils;
@@ -368,10 +369,9 @@ static Process startPythonProcess(
368369
// set the child process the output same as the parent process.
369370
pythonProcessBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT);
370371
}
371-
372372
LOG.info(
373373
"Starting Python process with environment variables: {{}}, command: {}",
374-
env.entrySet().stream()
374+
ConfigurationUtils.hideSensitiveValues(env).entrySet().stream()
375375
.map(e -> e.getKey() + "=" + e.getValue())
376376
.collect(Collectors.joining(", ")),
377377
String.join(" ", commands));

0 commit comments

Comments
 (0)