Skip to content

TEZ-4756: DAGUtils: configuration handling improvements - #539

Open
abstractdog wants to merge 3 commits into
apache:masterfrom
abstractdog:TEZ-4756
Open

abstractdog wants to merge 3 commits into
apache:masterfrom
abstractdog:TEZ-4756

Conversation

@abstractdog

Copy link
Copy Markdown
Contributor

Route each key/value pair through Hadoop's ConfigRedactor when building the ATS configuration map, so values matching the cluster's configured sensitive-key pattern are masked in the map published to Timeline. Adds a unit test.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new unit test includes credential-like strings that can trigger secret-scanning and it should be adjusted to use safe placeholders and more reliably exercise default redaction behavior.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Improves how Tez publishes AM configuration data to YARN Timeline/ATS by redacting sensitive configuration values (based on Hadoop’s sensitive-key patterns) before building the ATS configuration map, and adds a unit test covering redaction behavior.

Changes:

  • Route all configuration values through Hadoop ConfigRedactor in DAGUtils.convertConfigurationToATSMap.
  • Add a unit test verifying sensitive keys are masked and non-sensitive keys remain unchanged.
File summaries
File Description
tez-dag/src/main/java/org/apache/tez/dag/history/utils/DAGUtils.java Redacts configuration values via ConfigRedactor before publishing to ATS.
tez-dag/src/test/java/org/apache/tez/dag/history/utils/TestDAGUtils.java Adds a unit test validating redaction behavior for sensitive configuration keys.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 10m 45s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚 mvninstall 5m 10s master passed
+1 💚 compile 3m 59s master passed
+1 💚 checkstyle 0m 41s master passed
+1 💚 javadoc 0m 29s master passed
+0 🆗 spotbugs 1m 45s tez-dag in master has 537 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 2s the patch passed
+1 💚 codespell 1m 50s No new issues.
+1 💚 compile 4m 0s the patch passed
+1 💚 javac 4m 0s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 37s the patch passed
+1 💚 javadoc 0m 27s the patch passed
+1 💚 spotbugs 1m 57s the patch passed
_ Other Tests _
-1 ❌ unit 74m 19s /patch-unit-root.txt root in the patch passed.
+1 💚 asflicense 0m 31s The patch does not generate ASF License warnings.
112m 24s
Reason Tests
Failed junit tests tez.dag.app.rm.TestTaskSchedulerManager
Subsystem Report/Notes
Docker ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/3/artifact/out/Dockerfile
Optional Tests dupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
uname Linux f0238f8a4562 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality tez-personality.sh
git revision master / 5496f73
Default Java Eclipse Adoptium-21.0.12.1+1-LTS
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/3/testReport/
Max. process+thread count 1455 (vs. ulimit of 5500)
modules C: tez-dag U: tez-dag
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/3/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered by Apache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

Route each key/value pair through Hadoop's ConfigRedactor when building
the ATS configuration map, so values matching the cluster's configured
sensitive-key pattern are masked in the map published to Timeline.
Adds a unit test.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 33s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚 mvninstall 5m 3s master passed
+1 💚 compile 3m 58s master passed
+1 💚 checkstyle 0m 40s master passed
+1 💚 javadoc 0m 29s master passed
+0 🆗 spotbugs 1m 45s tez-dag in master has 537 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 4s the patch passed
+1 💚 codespell 1m 49s No new issues.
+1 💚 compile 3m 59s the patch passed
+1 💚 javac 3m 59s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 37s the patch passed
+1 💚 javadoc 0m 27s the patch passed
+1 💚 spotbugs 1m 56s the patch passed
_ Other Tests _
-1 ❌ unit 76m 16s /patch-unit-root.txt root in the patch passed.
+1 💚 asflicense 0m 32s The patch does not generate ASF License warnings.
103m 56s
Reason Tests
Failed junit tests tez.analyzer.TestAnalyzer
Subsystem Report/Notes
Docker ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/4/artifact/out/Dockerfile
Optional Tests dupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
uname Linux e46161590352 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality tez-personality.sh
git revision master / b434f5c
Default Java Eclipse Adoptium-21.0.12.1+1-LTS
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/4/testReport/
Max. process+thread count 1450 (vs. ulimit of 5500)
modules C: tez-dag U: tez-dag
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/4/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered by Apache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 32s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚 mvninstall 5m 19s master passed
+1 💚 compile 4m 0s master passed
+1 💚 checkstyle 0m 44s master passed
+1 💚 javadoc 0m 29s master passed
+0 🆗 spotbugs 1m 46s tez-dag in master has 537 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 0s the patch passed
+1 💚 codespell 1m 50s No new issues.
+1 💚 compile 4m 0s the patch passed
+1 💚 javac 4m 0s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 36s the patch passed
+1 💚 javadoc 0m 27s the patch passed
+1 💚 spotbugs 1m 57s the patch passed
_ Other Tests _
+1 💚 unit 74m 42s root in the patch passed.
+1 💚 asflicense 0m 32s The patch does not generate ASF License warnings.
102m 44s
Subsystem Report/Notes
Docker ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/5/artifact/out/Dockerfile
Optional Tests dupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
uname Linux e878f191d212 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality tez-personality.sh
git revision master / b434f5c
Default Java Eclipse Adoptium-21.0.12.1+1-LTS
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/5/testReport/
Max. process+thread count 1442 (vs. ulimit of 5500)
modules C: tez-dag U: tez-dag
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/5/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered by Apache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@ayushtkn ayushtkn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// core-default.xml and misses fs.s3a.session.token.
Configuration conf = new Configuration();
conf.set("tez.am.dag.scheduler.class",
"org.apache.tez.dag.app.dag.impl.DAGSchedulerNaturalOrder");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we rather than hardcoding, using the Class.getName() and for the configs as well, the Config variables

@abstractdog

Copy link
Copy Markdown
Contributor Author

thanks for the review @ayushtkn , addressed your comment in b285e5f

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 9m 6s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚 mvninstall 5m 4s master passed
+1 💚 compile 3m 59s master passed
+1 💚 checkstyle 0m 42s master passed
+1 💚 javadoc 0m 29s master passed
+0 🆗 spotbugs 1m 45s tez-dag in master has 537 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 3s the patch passed
+1 💚 codespell 1m 51s No new issues.
+1 💚 compile 4m 0s the patch passed
+1 💚 javac 4m 0s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 37s the patch passed
+1 💚 javadoc 0m 27s the patch passed
+1 💚 spotbugs 1m 57s the patch passed
_ Other Tests _
+1 💚 unit 72m 39s root in the patch passed.
+1 💚 asflicense 0m 32s The patch does not generate ASF License warnings.
109m 4s
Subsystem Report/Notes
Docker ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/6/artifact/out/Dockerfile
Optional Tests dupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
uname Linux 13a31662a9e0 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality tez-personality.sh
git revision master / b434f5c
Default Java Eclipse Adoptium-21.0.13+9-LTS
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/6/testReport/
Max. process+thread count 1401 (vs. ulimit of 5500)
modules C: tez-dag U: tez-dag
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-539/6/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered by Apache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants