sv2000 commented on a change in pull request #3273:
URL: https://github.com/apache/gobblin/pull/3273#discussion_r626857351
##########
File path:
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_catalog/FlowCatalog.java
##########
@@ -338,8 +340,16 @@ public Spec getSpecWrapper(URI uri) {
if (triggerListener) {
AddSpecResponse<CallbacksDispatcher.CallbackResults<SpecCatalogListener,
AddSpecResponse>> response = this.listeners.onAddSpec(flowSpec);
- for (Map.Entry<SpecCatalogListener, CallbackResult<AddSpecResponse>>
entry: response.getValue().getSuccesses().entrySet()) {
- responseMap.put(entry.getKey().getName(),
entry.getValue().getResult());
+ // If flow fails callbacks, need to prevent adding the flow to the
catalog
+ if (!response.getValue().getFailures().isEmpty()) {
+ for (Map.Entry<SpecCatalogListener, CallbackResult<AddSpecResponse>>
entry: response.getValue().getFailures().entrySet()) {
+
flowSpec.getCompilationErrors().add(ExceptionUtils.getStackTrace(entry.getValue().getError()));
Review comment:
Can we just use Throwables.getStackTraceAsString() to be consistent with
the rest of the code base?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]