[
https://issues.apache.org/jira/browse/GOBBLIN-1453?focusedWorklogId=603681&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-603681
]
ASF GitHub Bot logged work on GOBBLIN-1453:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 28/May/21 19:47
Start Date: 28/May/21 19:47
Worklog Time Spent: 10m
Work Description: arjun4084346 commented on a change in pull request
#3291:
URL: https://github.com/apache/gobblin/pull/3291#discussion_r641782985
##########
File path:
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_catalog/FlowCatalog.java
##########
@@ -341,16 +338,9 @@ public Spec getSpecWrapper(URI uri) {
if (triggerListener) {
AddSpecResponse<CallbacksDispatcher.CallbackResults<SpecCatalogListener,
AddSpecResponse>> response = this.listeners.onAddSpec(flowSpec);
- // 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(Throwables.getStackTraceAsString(entry.getValue().getError()));
- responseMap.put(entry.getKey().getName(), new
AddSpecResponse(entry.getValue().getResult()));
- }
- } else {
- for (Map.Entry<SpecCatalogListener, CallbackResult<AddSpecResponse>>
entry : response.getValue().getSuccesses().entrySet()) {
- responseMap.put(entry.getKey().getName(),
entry.getValue().getResult());
- }
+ // If flow fails compilation, the result will have a non-empty string
with the error
+ for (Map.Entry<SpecCatalogListener, CallbackResult<AddSpecResponse>>
entry : response.getValue().getSuccesses().entrySet()) {
+ responseMap.put(entry.getKey().getName(),
entry.getValue().getResult());
Review comment:
Please help me understand how the listeners work here. When a listener
decides that compilation passes, it sends a Dag, it compilation fails, it
returns null. In both the cases will the response be a success? What I mean is
do we need to look at response.getValue().getFailures() in any case?
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 603681)
Time Spent: 1.5h (was: 1h 20m)
> Improve error reporting on flow configs that fail to compile
> ------------------------------------------------------------
>
> Key: GOBBLIN-1453
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1453
> Project: Apache Gobblin
> Issue Type: Improvement
> Components: gobblin-service
> Affects Versions: 0.16.0
> Reporter: William Lo
> Assignee: Abhishek Tiwari
> Priority: Major
> Fix For: 0.16.0
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> Flow configurations that fail to compile can still be saved in some scenarios.
> Additionally, when they are rejected by the server, there should be a more
> detailed explanation as to why instead of just returning a 400.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)