Skip to content

Commit

Permalink
Fix the ToT broken build (#2570)
Browse files Browse the repository at this point in the history
  • Loading branch information
desaikomal authored Jul 21, 2023
1 parent d761651 commit 4b180a5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion helix-core/src/main/java/org/apache/helix/task/Workflow.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
import org.apache.helix.HelixException;
import org.apache.helix.task.beans.JobBean;
import org.apache.helix.task.beans.WorkflowBean;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
import org.yaml.snakeyaml.inspector.TagInspector;
import org.yaml.snakeyaml.nodes.Tag;

/**
* Houses a job dag and config set to fully describe a job workflow
Expand Down Expand Up @@ -137,7 +140,15 @@ public static Workflow parse(String yaml) throws Exception {
* Helper function to parse workflow from a generic {@link Reader}
*/
private static Workflow parse(Reader reader) throws Exception {
Yaml yaml = new Yaml(new Constructor(WorkflowBean.class));
LoaderOptions options = new LoaderOptions();
TagInspector tagInspector = new TagInspector() {
@Override
public boolean isGlobalTagAllowed(Tag tag) {
return false;
}
};
options.setTagInspector(tagInspector);
Yaml yaml = new Yaml(new Constructor(WorkflowBean.class, options));
WorkflowBean wf = (WorkflowBean) yaml.load(reader);
Builder workflowBuilder = new Builder(wf.name);

Expand Down

0 comments on commit 4b180a5

Please sign in to comment.