fix: quote FQN before entity link comparison in self-approval prevention#26766
fix: quote FQN before entity link comparison in self-approval prevention#26766
Conversation
Code Review ✅ ApprovedFixes self-approval prevention by properly quoting fully qualified names before entity link comparison, handling edge cases with dotted FQNs. No issues found. OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
There was a problem hiding this comment.
Pull request overview
This PR fixes self-approval prevention in governance approval workflows when the updater’s username contains dots by ensuring the username is quoted consistently before building the entity link used for assignee removal.
Changes:
- Quote
updatedByviaFullyQualifiedName.quoteName()before constructing the<#E::user::...>entity link used to remove self from assignees. - Add a focused unit regression test for dotted usernames and additional self-approval prevention cases.
- Update the existing integration test to use a dotted username and escape quoted FQNs in the JSON patch payload.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/userTask/impl/SetApprovalAssigneesImpl.java | Quotes updatedBy before entity-link comparison so self-removal works for dotted usernames. |
| openmetadata-service/src/test/java/org/openmetadata/service/governance/workflows/elements/nodes/userTask/impl/SetApprovalAssigneesImplTest.java | Adds unit regression coverage for dotted/simple/null updatedBy self-approval prevention behavior. |
| openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/WorkflowDefinitionResourceIT.java | Adjusts self-approval IT to use a dotted username and properly escape quoted FQNs in the reviewers patch JSON. |
...-integration-tests/src/test/java/org/openmetadata/it/tests/WorkflowDefinitionResourceIT.java
Show resolved
Hide resolved
OpenMetadata Service New-Code Coverage✅ PASS. Required changed-line coverage:
Only changed executable lines under |
|
🟡 Playwright Results — all passed (20 flaky)✅ 3411 passed · ❌ 0 failed · 🟡 20 flaky · ⏭️ 209 skipped
🟡 20 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
Changes have been cherry-picked to the 1.12.4 branch. |



Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>