def _get_task_target():
  """Get the default target for a pipeline task.

  Current version id format is: user_defined_version.minor_version_number
  Current module id is just the module's name. It could be "default"

  Returns:
    A complete target name is of format version.module. If module is the
  default module, just version. None if target can not be determined.
  """
  # Break circular dependency.
  # pylint: disable=g-import-not-at-top
  import pipeline
  if pipeline._TEST_MODE:
    return None

  # Further protect against test cases that doesn't set env vars
  # propertly.
  if ("CURRENT_VERSION_ID" not in os.environ or
      "CURRENT_MODULE_ID" not in os.environ):
    logging.warning("Running Pipeline in non TEST_MODE but important "
                    "env vars are not set.")
    return None

  version = os.environ["CURRENT_VERSION_ID"].split(".")[0]
  module = os.environ["CURRENT_MODULE_ID"]
  return "%s.%s" % (version, module)
def _get_task_target ( ) : import pipeline if pipeline . _TEST_MODE : return None if ( "CURRENT_VERSION_ID" not in os . environ or "CURRENT_MODULE_ID" not in os . environ ) : logging . warning ( "Running Pipeline in non TEST_MODE but important " "env vars are not set." ) return None version = os . environ [ "CURRENT_VERSION_ID" ] . split ( "." ) [ 0 ] module = os . environ [ "CURRENT_MODULE_ID" ] return "%s.%s" % ( version , module )
Get the default target for a pipeline task.

  Current version id format is: user_defined_version.minor_version_number
  Current module id is just the module's name. It could be "default"

  Returns:
    A complete target name is of format version.module. If module is the
  default module, just version. None if target can not be determined.