Boot prescription pipeline unit¶
Declaring pipeline units of type boot.
The pipeline unit is registered based on
directive - see documentation for more info.
The following example shows all the configuration options that can be applied for a boot prescription pipeline unit type. See respective sections described below for more info. Also note, the example shows all the options that can be supplied and is not semantically valid:
name: BootUnit type: boot should_include: # See should_include section for more info. match: # Criteria to trigger run of this pipeline unit. Defaults to always running the boot pipeline unit if no package_name is provided. package_name: flask # Name of the package that needs to be present in the direct dependency listing to run this unit. run: stack_info: # Information printed to the recommended stack report. - type: ERROR message: Unable to perform this operation link: 'https://thoth-station.ninja' # A link to stack info or a link to a web page. # Configuration of prematurely terminating the resolution process - the # message will be reported to the user. If this configuration option is not # set, the resolver will not terminate when running this unit. eager_stop_pipeline: Terminating resolution as 'flask' is in direct dependencies # Configuration of prematurely terminating the resolution process. not_acceptable: Cannot include this package log: message: Some text printed to log on pipeline unit run type: WARNING
For a complete schema check the schema.py file in adviser’s implementation.
Optional, the match section allows to define a name of the package that should be present in direct dependencies to trigger run of the pipeline unit.
name: BootUnit type: boot should_include: adviser_pipeline: true match: package_name: flask run: log: type: WARNING message: Found package 'flask' in the direct dependency listing
It is also possibly to match the given pipeline unit for multiple package
names by providing a match listing. In that case, multiple pipeline units with
match configuration (but same
run section) will be registered to
the resolution pipeline:
name: BootUnit type: boot should_include: adviser_pipeline: true match: - package_name: flask - package_name: numpy run: log: type: WARNING message: Found package 'flask' or 'numpy' in the direct dependency listing
Optional a list of information added to the “stack info” field that is specific for the application stack.
Each entry in the list is specified by three attributes:
type- any of
ERRORspecifying severity of the produced stack information
message- a message in a free text form printed to users
link- a link to a document describing more information in detail
name: BootUnit type: boot should_include: adviser_pipeline: true recommendation_types: - performance runtime_environments: operating_systems: - name: rhel version: '8' python_version: '==3.6' run: stack_info: - type: WARNING message: It is recommended to switch to Python 3.8 to improve performance link: 'https://developers.redhat.com/blog/2020/06/25/red-hat-enterprise-linux-8-2-brings-faster-python-3-8-run-speeds/'
An optional string describing exception that should be raised during resolver boot causing the resolution process to halt.
name: BootUnit type: boot should_include: adviser_pipeline: true recommendation_types: - security runtime_environments: operating_systems: - name: fedora run: eager_stop_pipeline: Security recommendation types are disabled for Fedora, use RHEL instead
Print the given message to logs if the pipeline unit is included and run.
The log entry is specified by two attributes:
type- any of
ERRORspecifying severity of the produced message
message- a message in a free text form printed to resolver log
name: BootUnit type: boot should_include: adviser_pipeline: true dependency_monkey_pipeline: true run: log: message: Using prescriptions in the resolution process type: INFO