thoth.investigator package

Subpackages

Submodules

thoth.investigator.common module

This is Thoth investigator common methods.

async thoth.investigator.common.default_metric_handler(contents, msg, **kwargs)[source]

Increments counter specific to message type and version that was encountered.

async thoth.investigator.common.learn_about_security(openshift: thoth.common.openshift.OpenShift, graph: thoth.storages.graph.postgres.GraphDatabase, is_present: bool, package_name: str, index_url: str, package_version: str) int[source]

Learn about security of Package Version Index.

async thoth.investigator.common.learn_using_revsolver(openshift: thoth.common.openshift.OpenShift, is_present: bool, package_name: str, package_version: str, revsolver_packages_seen: Optional[List[Tuple[str, str]]] = None) Tuple[int, List[Tuple[str, str]]][source]

Learn using revsolver about Package Version dependencies.

async thoth.investigator.common.learn_using_solver(openshift: thoth.common.openshift.OpenShift, graph: thoth.storages.graph.postgres.GraphDatabase, is_present: bool, package_name: str, index_url: str, package_version: str, solver: Optional[str] = None) int[source]

Learn using solver about Package Version Index dependencies.

thoth.investigator.common.register_handler(topic_name: str, version_strings: List[str], handler_table: dict = {'ocp4-stage.thoth.advise-reporter.advise-justification': {}, 'ocp4-stage.thoth.adviser-trigger': {}, 'ocp4-stage.thoth.build-analysis-trigger': {}, 'ocp4-stage.thoth.cve-update.cve-provided': {}, 'ocp4-stage.thoth.inspection-completed': {}, 'ocp4-stage.thoth.investigator.si-unanalyzed-package': {}, 'ocp4-stage.thoth.investigator.unresolved-package': {}, 'ocp4-stage.thoth.investigator.unrevsolved-package': {}, 'ocp4-stage.thoth.kebechet-run-url-trigger': {}, 'ocp4-stage.thoth.kebechet-trigger': {}, 'ocp4-stage.thoth.package-extract-trigger': {}, 'ocp4-stage.thoth.package-release.package-released': {}, 'ocp4-stage.thoth.package-update.hash-mismatch': {}, 'ocp4-stage.thoth.package-update.missing-package': {}, 'ocp4-stage.thoth.package-update.missing-package-version': {}, 'ocp4-stage.thoth.provenance-checker-trigger': {}, 'ocp4-stage.thoth.repo-init': {}, 'ocp4-stage.thoth.solver.solved-package': {}, 'ocp4-stage.thoth.update-provides-source-distro': {}})[source]

Register function to specific message versions.

async thoth.investigator.common.schedule_kebechet_administrator(openshift: thoth.common.openshift.OpenShift, message_info: dict, message_name: str) Optional[str][source]

Schedule Kebechet Administrator from a particular message.

async thoth.investigator.common.wait_for_limit(openshift: thoth.common.openshift.OpenShift, workflow_namespace: str)[source]

Wait for pending workflow limit.

thoth.investigator.configuration module

This is Thoth investigator configuration parameters.

class thoth.investigator.configuration.Configuration[source]

Bases: object

Configuration of investigator.

ACK_ON_FAIL = False
BACKOFF = 0.5
CONSUMER_MODE = 'investigator'
DEPLOYMENT_NAME = 'ocp4-stage'
LOG_REVSOLVER = False
LOG_SOLVER = False
MAX_RETRIES = 5
NUM_WORKERS = 5
PENDING_WORKFLOW_LIMIT = None
SLEEP_TIME = 2
THOTH_BACKEND_NAMESPACE = 'thoth-backend-stage'
THOTH_INVESTIGATOR_SCHEDULE_KEBECHET_ADMIN = 1
THOTH_INVESTIGATOR_SCHEDULE_REVSOLVER = 1
THOTH_INVESTIGATOR_SCHEDULE_SECURITY = 1
THOTH_INVESTIGATOR_SCHEDULE_SOLVER = 1
THOTH_MIDDLETIER_NAMESPACE = 'thoth-middletier-stage'
class thoth.investigator.configuration.ConsumerModeEnum(value)[source]

Bases: enum.Enum

Class representing the different modes the consumer can use which correspond to different handler tables.

investigator = 1
metrics = 2

thoth.investigator.metrics module

This is Thoth investigator consumer metrics.

Module contents

This is Thoth investigator.