Beispiel #1
0
    def _init_graph_session(
        options_bootstrapper: OptionsBootstrapper,
        build_config: BuildConfiguration,
        options: Options,
    ) -> LegacyGraphSession:
        native = Native()
        native.set_panic_handler()
        graph_scheduler_helper = EngineInitializer.setup_legacy_graph(
            native, options_bootstrapper, build_config)

        v2_ui = options.for_global_scope().get("v2_ui", False)
        zipkin_trace_v2 = options.for_scope("reporting").zipkin_trace_v2
        # TODO(#8658) This should_report_workunits flag must be set to True for
        # StreamingWorkunitHandler to receive WorkUnits. It should eventually
        # be merged with the zipkin_trace_v2 flag, since they both involve most
        # of the same engine functionality, but for now is separate to avoid
        # breaking functionality associated with zipkin tracing while iterating on streaming workunit reporting.
        stream_workunits = len(
            options.for_global_scope().streaming_workunits_handlers) != 0
        return graph_scheduler_helper.new_session(
            zipkin_trace_v2,
            RunTracker.global_instance().run_id,
            v2_ui,
            should_report_workunits=stream_workunits,
        )
Beispiel #2
0
    def _maybe_init_graph_session(graph_session, options_bootstrapper,
                                  build_config, global_options):
        if graph_session:
            return graph_session

        native = Native()
        native.set_panic_handler()
        graph_scheduler_helper = EngineInitializer.setup_legacy_graph(
            native, options_bootstrapper, build_config)

        return graph_scheduler_helper.new_session(global_options.v2_ui)
Beispiel #3
0
    def _maybe_init_graph_session(graph_session, options_bootstrapper,
                                  build_config, options):
        if graph_session:
            return graph_session

        native = Native()
        native.set_panic_handler()
        graph_scheduler_helper = EngineInitializer.setup_legacy_graph(
            native, options_bootstrapper, build_config)

        v2_ui = options.for_global_scope().v2_ui
        zipkin_trace_v2 = options.for_scope('reporting').zipkin_trace_v2
        return graph_scheduler_helper.new_session(zipkin_trace_v2, v2_ui)
Beispiel #4
0
  def _maybe_init_graph_session(graph_session, options_bootstrapper,build_config, options):
    if graph_session:
      return graph_session

    native = Native()
    native.set_panic_handler()
    graph_scheduler_helper = EngineInitializer.setup_legacy_graph(
      native,
      options_bootstrapper,
      build_config
    )

    v2_ui = options.for_global_scope().v2_ui
    zipkin_trace_v2 = options.for_scope('reporting').zipkin_trace_v2
    return graph_scheduler_helper.new_session(zipkin_trace_v2, v2_ui)
Beispiel #5
0
  def _maybe_init_graph_session(graph_session, options_bootstrapper,build_config, options):
    if not graph_session:
      native = Native()
      native.set_panic_handler()
      graph_scheduler_helper = EngineInitializer.setup_legacy_graph(
        native,
        options_bootstrapper,
        build_config
      )

      v2_ui = options.for_global_scope().v2_ui
      zipkin_trace_v2 = options.for_scope('reporting').zipkin_trace_v2
      #TODO(gregorys) This should_report_workunits flag must be set to True for
      # AsyncWorkunitHandler to receive WorkUnits. It should eventually
      # be merged with the zipkin_trace_v2 flag, since they both involve most
      # of the same engine functionality, but for now is separate to avoid
      # breaking functionality associated with zipkin tracing while iterating on async workunit reporting.
      should_report_workunits = False
      graph_session = graph_scheduler_helper.new_session(zipkin_trace_v2, RunTracker.global_instance().run_id, v2_ui, should_report_workunits)
    return graph_session, graph_session.scheduler_session