Warn when encountering non-ModifiedNode 95/114895/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 27 Dec 2024 18:22:51 +0000 (19:22 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 14 Jan 2025 10:04:26 +0000 (11:04 +0100)
We have a pass-through here, which really ends up being an undefined
state transition: we certainly do not know the state proposed.

Promote the LOG.debug() to LOG.warn() and include a stack trace to flush
out offenders.

JIRA: YANGTOOLS-1651
Change-Id: I7481aa1a8302308990392b0d6b374e41ef3e1316
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit c64cb69ea96ce8e1157f3e9fc4511524919ecabb)

data/yang-data-tree-ri/src/main/java/org/opendaylight/yangtools/yang/data/tree/impl/AbstractValidation.java

index 8f7216a8be164b8225ccab6ab482719d968e07cf..86cf6f196be9e935beb8ed482628c7e7db3fb823 100644 (file)
@@ -89,7 +89,9 @@ abstract sealed class AbstractValidation extends ModificationApplyOperation
         delegate.checkApplicable(path, modification, currentMeta, version);
         if (!(modification instanceof ModifiedNode modified)) {
             // FIXME: 7.0.0: turn this into a verify?
-            LOG.debug("Could not validate {}, does not implement expected class {}", modification, ModifiedNode.class);
+            LOG.warn("""
+                Could not validate {}, does not implement expected class {}. Assuming validation passed. This code path
+                will be failing soon""", modification, ModifiedNode.class, new Throwable());
             return;
         }