-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Approval workflow for classification feedback #25347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
openmetadata-service/src/main/java/org/openmetadata/service/util/Registry.java
Show resolved
Hide resolved
openmetadata-service/src/main/java/org/openmetadata/service/util/Registry.java
Show resolved
Hide resolved
# Conflicts: # openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/WorkflowEventConsumer.java
🔍 CI failure analysis for 763022c: maven-sonarcloud-ci: 129 failures total, TagResourceTest has only 2 pre-existing bulk loading failures. ALL recognizer feedback tests PASS. Same successful pattern as previous SonarCloud runs.Issuemaven-sonarcloud-ci (Job 60811353904): 129 test failures Root CauseSame pre-existing test failures pattern - All recognizer feedback tests PASS TagResourceTest Results:
Other 127 failures: Spread across many unrelated resource tests AnalysisConsistent pattern with previous SonarCloud run (Job 60788456002): Both SonarCloud runs show identical results:
Comparison Across All CI Jobs:
SummaryStatus: ✅ All Recognizer Feedback Tests Pass in Unit Tests maven-sonarcloud-ci shows the same successful pattern:
Critical Finding: Unit tests consistently show that:
This confirms the code review findings that the bugs are in the workflow integration layer, not in the individual components. Blocking Issues (from integration tests):
These bugs need to be fixed for integration tests to pass. Code Review
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | This comment will update automatically (Docs)
| String.format( | ||
| "Approval required for recognizer feedback on tag %s", tag.getName())) | ||
| .withCreatedBy(feedback.getCreatedBy().getFullyQualifiedName()) | ||
| .withAbout(about.getLinkString()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Details
In CreateRecognizerFeedbackApprovalTaskImpl.createRecognizerFeedbackApprovalTask(), the code accesses feedback.getCreatedBy().getFullyQualifiedName() without null checking. If createdBy is null, this will throw a NullPointerException.
The code at lines 1614-1618 does:
.withCreatedBy(feedback.getCreatedBy().getFullyQualifiedName())
...
.withUpdatedBy(feedback.getCreatedBy().getFullyQualifiedName())While the publishChangeEvent method in RecognizerFeedbackRepository properly handles null with feedback.getCreatedBy() != null ? feedback.getCreatedBy().getName() : "unknown", this code path doesn't.
Suggested fix:
String createdByFqn = feedback.getCreatedBy() != null
? feedback.getCreatedBy().getFullyQualifiedName()
: "unknown";
.withCreatedBy(createdByFqn)
.withUpdatedBy(createdByFqn)Was this helpful? React with 👍 / 👎
| try { | ||
| thread = feedRepository.getTask(about, TaskType.RecognizerFeedbackApproval, TaskStatus.Open); | ||
| WorkflowHandler.getInstance() | ||
| .terminateTaskProcessInstance(thread.getId(), "A Newer Process Instance is Running."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Details
In CreateRecognizerFeedbackApprovalTaskImpl.createRecognizerFeedbackApprovalTask(), when an existing open task is found, it terminates the old process instance but then returns the stale thread object without creating a new task:
try {
thread = feedRepository.getTask(about, TaskType.RecognizerFeedbackApproval, TaskStatus.Open);
WorkflowHandler.getInstance()
.terminateTaskProcessInstance(thread.getId(), "A Newer Process Instance is Running.");
} catch (EntityNotFoundException ex) {
// Only creates new task on EntityNotFoundException
TaskDetails taskDetails = ...
thread = new Thread()...
feedRepository.create(thread);
}
return thread;If an existing open task is found, the code terminates it but returns the old, now-terminated thread instead of creating a fresh one. The new task details are only created in the catch block. This means subsequent code will be working with a stale thread reference.
Suggested fix: Move the task creation logic outside the try-catch or create a new task after terminating the old one.
Was this helpful? React with 👍 / 👎
|
|



Describe your changes:
Implemets #25177
Here's how the new feedback looks like
Summary by Gitar
RecognizerFeedbackschema tracks user feedback on auto-applied classification tags with 4 feedback types (FALSE_POSITIVE, INCORRECT_CLASSIFICATION, OVERLY_BROAD, CONTEXT_SPECIFIC)createRecognizerFeedbackApprovalTask) and automated apply/reject tasks with configurable thresholdsFeedbackApprovalTask.tsxdisplays feedback details including type, submitter, timestamp, and entity link with proper i18n supportTaskFeedCardandTaskTabcomponents to recognizeRecognizerFeedbackApprovaltask type and handle approval/rejection like glossary tasksRecognizerFeedbackwith resolution tracking, status lifecycle, and recognizer metadataThis will update automatically on new commits.
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>