Task models
Models used by debusine tasks.
- class debusine.tasks.models.ActionRecordInTaskHistory(*, action: Literal[ActionTypes.RECORD_IN_TASK_HISTORY] = ActionTypes.RECORD_IN_TASK_HISTORY, subject: str | None = None, context: str | None = None)[source]
Bases:
BaseTaskDataModelAction for recording the task run in a task-history collection.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.ActionRetryWithDelays(*, action: Literal[ActionTypes.RETRY_WITH_DELAYS] = ActionTypes.RETRY_WITH_DELAYS, delays: Annotated[list[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern=re.compile('^([0-9]+)([mhdw])$'))])]], MinLen(min_length=1)])[source]
Bases:
BaseTaskDataModelAction for retrying a work request with delays.
- delays: Annotated[list[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern=re.compile('^([0-9]+)([mhdw])$'))])]], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.ActionSendNotification(*, action: Literal[ActionTypes.SEND_NOTIFICATION] = ActionTypes.SEND_NOTIFICATION, channel: str, data: NotificationDataEmail | None = None)[source]
Bases:
BaseTaskDataModelAction for sending a notification.
- data: NotificationDataEmail | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.ActionSkipIfLookupResultChanged(*, action: Literal[ActionTypes.SKIP_IF_LOOKUP_RESULT_CHANGED] = ActionTypes.SKIP_IF_LOOKUP_RESULT_CHANGED, lookup: str, collection_item_id: int | None, promise_name: str | None = None)[source]
Bases:
BaseTaskDataModelAction for skipping a work request if a lookup result changed.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.ActionTypes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for EventReaction actions.
- RECORD_IN_TASK_HISTORY = 'record-in-task-history'
- RETRY_WITH_DELAYS = 'retry-with-delays'
- SEND_NOTIFICATION = 'send-notification'
- SKIP_IF_LOOKUP_RESULT_CHANGED = 'skip-if-lookup-result-changed'
- UPDATE_COLLECTION_WITH_ARTIFACTS = 'update-collection-with-artifacts'
- UPDATE_COLLECTION_WITH_DATA = 'update-collection-with-data'
- class debusine.tasks.models.ActionUpdateCollectionWithArtifacts(*, action: Literal[ActionTypes.UPDATE_COLLECTION_WITH_ARTIFACTS] = ActionTypes.UPDATE_COLLECTION_WITH_ARTIFACTS, collection: int | str, name_template: str | None = None, variables: dict[str, Any] | None = None, artifact_filters: dict[str, Any], created_at: datetime | None = None)[source]
Bases:
BaseTaskDataModelAction for updating a collection with artifacts.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.ActionUpdateCollectionWithData(*, action: Literal[ActionTypes.UPDATE_COLLECTION_WITH_DATA] = ActionTypes.UPDATE_COLLECTION_WITH_DATA, collection: int | str, category: BareDataCategory, name_template: str | None = None, data: dict[str, Any] | None = None, created_at: datetime | None = None)[source]
Bases:
BaseTaskDataModelAction for updating a collection with bare data.
- category: BareDataCategory
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.ArtifactInfo(*, label: str, artifact_id: int, category: ArtifactCategory, data: ArtifactData, lookup: int | str)[source]
Bases:
InputArtifactSingleInformation about an artifact.
- category: ArtifactCategory
Artifact category
- data: ArtifactData
Artifact data
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.AssembleSignedSourceData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', backend: BackendType = BackendType.AUTO, environment: int | str, build_architecture: str | None = None, template: int | str, signed: LookupMultiple)[source]
Bases:
BaseTaskDataWithExecutorIn-memory task data for the AssembleSignedSource task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- signed: LookupMultiple
- class debusine.tasks.models.AssembleSignedSourceDynamicData(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, environment_id: int, template_id: int, signed_ids: list[int])[source]
Bases:
BaseDynamicTaskDataWithExecutorDynamic data for the AssembleSignedSource task.
- get_input_artifacts_ids() list[int][source]
Return the list of input artifact IDs used by this task.
This is used by views to show what artifacts were used by a task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.AutopkgtestData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', extra_repositories: list[~debusine.tasks.models.ExtraDebusineRepository | ~debusine.tasks.models.ExtraExternalRepository] | None = None, backend: ~debusine.tasks.models.BackendType = BackendType.AUTO, environment: int | str, build_architecture: str, input: ~debusine.tasks.models.AutopkgtestInput, include_tests: list[str] = <factory>, exclude_tests: list[str] = <factory>, debug_level: ~typing.Annotated[int, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=3)] = 0, use_packages_from_base_repository: bool = False, extra_environment: dict[str, str] = <factory>, needs_internet: ~debusine.tasks.models.AutopkgtestNeedsInternet = AutopkgtestNeedsInternet.RUN, fail_on: ~debusine.tasks.models.AutopkgtestFailOn = <factory>, timeout: ~debusine.tasks.models.AutopkgtestTimeout | None = None)[source]
Bases:
BaseTaskDataWithExecutor,BaseTaskDataWithExtraRepositoriesIn memory task data for the Autopkgtest task.
- debug_level: Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=3)])]
- fail_on: AutopkgtestFailOn
- input: AutopkgtestInput
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- needs_internet: AutopkgtestNeedsInternet
- timeout: AutopkgtestTimeout | None
- class debusine.tasks.models.AutopkgtestDynamicData(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, extra_repositories: list[~debusine.tasks.models.ExtraExternalRepository] | None = None, environment_id: int, input_source_artifact_id: int, input_binary_artifacts_ids: list[int], input_context_artifacts_ids: list[int] = <factory>)[source]
Bases:
BaseDynamicTaskDataWithExecutor,BaseDynamicTaskDataWithExtraRepositoriesDynamic data for the Autopkgtest task.
- get_input_artifacts_ids() list[int][source]
Return the list of input artifact IDs used by this task.
This is used by views to show what artifacts were used by a task.
- get_source_package_name() str | None[source]
Extract the source package name.
- Returns:
the source package name, if applicable, and None otherwise.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.AutopkgtestFailOn(*, failed_test: bool = True, flaky_test: bool = False, skipped_test: bool = False)[source]
Bases:
BaseTaskDataModelPossible values for fail_on.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.AutopkgtestInput(*, source_artifact: int | str, binary_artifacts: ~debusine.tasks.models.LookupMultiple, context_artifacts: ~debusine.tasks.models.LookupMultiple = <factory>)[source]
Bases:
BaseTaskDataModelInput for an autopkgtest task.
- binary_artifacts: LookupMultiple
- context_artifacts: LookupMultiple
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.AutopkgtestNeedsInternet(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for needs_internet.
- RUN = 'run'
- SKIP = 'skip'
- TRY = 'try'
- class debusine.tasks.models.AutopkgtestTimeout(*, global_: Annotated[int | None, Ge(ge=0)] = None, factor: Annotated[int | None, Ge(ge=0)] = None, short: Annotated[int | None, Ge(ge=0)] = None, install: Annotated[int | None, Ge(ge=0)] = None, test: Annotated[int | None, Ge(ge=0)] = None, copy: Annotated[int | None, Ge(ge=0)] = None)[source]
Bases:
BaseTaskDataModelTimeout specifications for an autopkgtest task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BackendType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for backend.
- AUTO = 'auto'
- INCUS_LXC = 'incus-lxc'
- INCUS_VM = 'incus-vm'
- QEMU = 'qemu'
- UNSHARE = 'unshare'
- class debusine.tasks.models.BaseDynamicTaskData(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>)[source]
Bases:
BaseTaskDataModelBase class for dynamic task data.
This is computed by the scheduler when dispatching a task to a worker. It may involve resolving artifact lookups.
- get_input_artifacts_ids() list[int][source]
Return the list of input artifact IDs used by this task.
This is used by views to show what artifacts were used by a task.
- get_source_package_name() str | None[source]
Extract the source package name.
- Returns:
the source package name, if applicable, and None otherwise.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- parameter_summary: str | None
Brief human-readable summary of the most important parameters to this work request.
- runtime_context: str | None
An abstract string value representing the runtime context in which the task is executed, for the purpose of recording statistics. It is meant to represent some of the task parameters that can significantly alter the runtime behaviour of the task.
- class debusine.tasks.models.BaseDynamicTaskDataWithExecutor(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, environment_id: int | None = None)[source]
Bases:
BaseDynamicTaskDataDynamic task data for executors.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BaseDynamicTaskDataWithExtraRepositories(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, extra_repositories: list[~debusine.tasks.models.ExtraExternalRepository] | None = None)[source]
Bases:
BaseDynamicTaskDataDynamic task data for extra repositories.
- extra_repositories: list[ExtraExternalRepository] | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BaseExtraRepository(*, components: list[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(\\w|-)+$')])]] | None = None)[source]
Bases:
BaseTaskDataModel,ABCGeneric extra repositories for Debian tasks.
- components: list[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(\\w|-)+$')])]] | None
- classmethod convert_empty_components_to_none(value: list[str] | None) list[str] | None[source]
Rewrite an empty components list to None.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BaseInputArtifactSingle(*, label: str, artifact_id: int | None = None, category: ArtifactCategory | None = None, data: ArtifactData | None = None, lookup: int | str)[source]
Bases:
BaseTaskInputArtifact,BaseLabeledTaskInputSingle task input artifact.
- lookup: int | str
Lookup used to obtain the artifact. Usually from the task data but could be generated by the task logic.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BaseLabeledTaskInput(*, label: str)[source]
Bases:
BaseTaskInputTask input annotated with a task data field name.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BaseTaskData(*, task_configuration: int | str | None = 'default@debusine:task-configuration')[source]
Bases:
BaseTaskDataModelBase class for task data.
Task data is encoded as JSON in the database and in the API, and it is modeled as a pydantic data structure in memory for both ease of access and validation.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BaseTaskDataModel[source]
Bases:
BaseModelStricter pydantic defaults for task data models.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BaseTaskDataWithExecutor(*, task_configuration: int | str | None = 'default@debusine:task-configuration', backend: BackendType = BackendType.AUTO, environment: int | str | None = None, build_architecture: str | None = None)[source]
Bases:
BaseTaskDataBase task data with fields used to configure executors.
- backend: BackendType
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BaseTaskDataWithExtraRepositories(*, task_configuration: int | str | None = 'default@debusine:task-configuration', extra_repositories: list[ExtraDebusineRepository | ExtraExternalRepository] | None = None)[source]
Bases:
BaseTaskDataBase task data with fields used to configure extra_repositories.
- extra_repositories: list[ExtraDebusineRepository | ExtraExternalRepository] | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BaseTaskInput[source]
Bases:
BaseModelBase for structures defining task input artifacts and collections.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BaseTaskInputArtifact(*, artifact_id: int | None = None, category: ArtifactCategory | None = None, data: ArtifactData | None = None)[source]
Bases:
BaseTaskInputRepresent an artifact as task input.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BlhcData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', backend: ~debusine.tasks.models.BackendType = BackendType.AUTO, environment: int | str, build_architecture: str, input: ~debusine.tasks.models.BlhcInput, extra_flags: list[~debusine.tasks.models.BlhcFlags] = <factory>)[source]
Bases:
BaseTaskDataWithExecutorIn memory task data for the Blhc task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BlhcDynamicData(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, environment_id: int, input_artifact_id: int, input_artifact_data: ~debusine.artifacts.models.DebianPackageBuildLog | None = None)[source]
Bases:
BaseDynamicTaskDataWithExecutorDynamic data for the Blhc task.
- get_input_artifacts_ids() list[int][source]
Return the list of input artifact IDs used by this task.
This is used by views to show what artifacts were used by a task.
- get_source_package_name() str | None[source]
Extract the source package name.
- Returns:
the source package name, if applicable, and None otherwise.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.BlhcFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for extra_flags.
- ALL = '--all'
- BINDNOW = '--bindnow'
- BUILDD = '--buildd'
- COLOR = '--color'
- DEBIAN = '--debian'
- LINE_NUMBERS = '--line-numbers'
- PIE = '--pie'
- class debusine.tasks.models.BlhcInput(*, artifact: int | str)[source]
Bases:
BaseTaskDataModelInput for a blhc task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.CollectionItemMatcher(*, kind: CollectionItemMatcherKind, value: Any)[source]
Bases:
BaseTaskDataModelA matcher for collection item name or per-item data fields.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.CollectionItemMatcherKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for CollectionItemMatcher.kind.
- CONTAINS = 'contains'
- ENDSWITH = 'endswith'
- EXACT = 'exact'
- STARTSWITH = 'startswith'
- class debusine.tasks.models.Confirmation(*, confirmed: bool, comment: str | None = None)[source]
Bases:
BaseTaskDataModelA record that a work request was confirmed or denied by a user.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.DebDiffData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', backend: ~debusine.tasks.models.BackendType = BackendType.AUTO, environment: int | str, build_architecture: str, input: ~debusine.tasks.models.DebDiffInput, extra_flags: list[~debusine.tasks.models.DebDiffFlags] = <factory>)[source]
Bases:
BaseTaskDataWithExecutorIn memory task data for the DebDiff task.
- extra_flags: list[DebDiffFlags]
- input: DebDiffInput
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.DebDiffDynamicData(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, environment_id: int, input_source_artifacts_ids: ~typing.Annotated[list[int] | None, ~annotated_types.MinLen(min_length=2), ~annotated_types.MaxLen(max_length=2)] = None, input_binary_artifacts_ids: ~typing.Annotated[list[list[int]] | None, ~annotated_types.MinLen(min_length=2), ~annotated_types.MaxLen(max_length=2)] = None)[source]
Bases:
BaseDynamicTaskDataWithExecutorDynamic data for the DebDiff task.
- get_input_artifacts_ids() list[int][source]
Return the list of input artifact IDs used by this task.
This is used by views to show what artifacts were used by a task.
- get_source_package_name() str | None[source]
Extract the source package name.
- Returns:
the source package name, if applicable, and None otherwise.
- input_binary_artifacts_ids: Annotated[list[list[int]] | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=2), MaxLen(max_length=2)])]
- input_source_artifacts_ids: Annotated[list[int] | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=2), MaxLen(max_length=2)])]
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.DebDiffFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for extra_flags.
- DIFFSTAT = '--diffstat'
- DIRS = '--dirs'
- IGNORE_SPACE = '--ignore-space'
- NOCONTROL = '--nocontrol'
- PATCHES = '--apply-patches'
- SHOW_MOVED = '--show-moved'
- WDIFF = '--wdiff-source-control'
- class debusine.tasks.models.DebDiffInput(*, source_artifacts: Annotated[list[int | str] | None, MinLen(min_length=2), MaxLen(max_length=2)] = None, binary_artifacts: Annotated[list[LookupMultiple] | None, MinLen(min_length=2), MaxLen(max_length=2)] = None)[source]
Bases:
BaseTaskDataModelInput for a debdiff task.
- binary_artifacts: Annotated[list[LookupMultiple] | None, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=2), MaxLen(max_length=2)])]
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.DebootstrapBootstrapOptions(*, architecture: str, variant: ~debusine.tasks.models.DebootstrapVariant | None = None, extra_packages: list[str] = <factory>, use_signed_by: bool = True)[source]
Bases:
SystemBootstrapOptionsStructure of debootstrap options.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- variant: DebootstrapVariant | None
- class debusine.tasks.models.DebootstrapVariant(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumVariants supported by debootstrap.
- BUILDD = 'buildd'
- MINBASE = 'minbase'
- class debusine.tasks.models.DiskImage(*, format: DiskImageFormat, filename: str = 'image', kernel_package: str | None = None, bootloader: str | None = None, partitions: Annotated[list[Partition], MinLen(min_length=1)])[source]
Bases:
BaseTaskDataModelDisk image definition.
- format: DiskImageFormat
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.DiskImageFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible disk image formats.
- QCOW2 = 'qcow2'
- RAW = 'raw'
- class debusine.tasks.models.EventReactions(*, on_creation: list[Annotated[ActionSkipIfLookupResultChanged | ActionSendNotification | ActionUpdateCollectionWithArtifacts | ActionUpdateCollectionWithData | ActionRetryWithDelays | ActionRecordInTaskHistory, FieldInfo(annotation=NoneType, required=True, discriminator='action')]] = [], on_unblock: list[Annotated[ActionSkipIfLookupResultChanged | ActionSendNotification | ActionUpdateCollectionWithArtifacts | ActionUpdateCollectionWithData | ActionRetryWithDelays | ActionRecordInTaskHistory, FieldInfo(annotation=NoneType, required=True, discriminator='action')]] = [], on_assignment: list[Annotated[ActionSkipIfLookupResultChanged | ActionSendNotification | ActionUpdateCollectionWithArtifacts | ActionUpdateCollectionWithData | ActionRetryWithDelays | ActionRecordInTaskHistory, FieldInfo(annotation=NoneType, required=True, discriminator='action')]] = [], on_success: list[Annotated[ActionSkipIfLookupResultChanged | ActionSendNotification | ActionUpdateCollectionWithArtifacts | ActionUpdateCollectionWithData | ActionRetryWithDelays | ActionRecordInTaskHistory, FieldInfo(annotation=NoneType, required=True, discriminator='action')]] = [], on_failure: list[Annotated[ActionSkipIfLookupResultChanged | ActionSendNotification | ActionUpdateCollectionWithArtifacts | ActionUpdateCollectionWithData | ActionRetryWithDelays | ActionRecordInTaskHistory, FieldInfo(annotation=NoneType, required=True, discriminator='action')]] = [])[source]
Bases:
BaseTaskDataModelStructure for event reactions.
- add_reaction(name: Literal['on_creation', 'on_unblock', 'on_assignment', 'on_success', 'on_failure'], action: Annotated[ActionSkipIfLookupResultChanged | ActionSendNotification | ActionUpdateCollectionWithArtifacts | ActionUpdateCollectionWithData | ActionRetryWithDelays | ActionRecordInTaskHistory, FieldInfo(annotation=NoneType, required=True, discriminator='action')]) None[source]
Add an EventReaction to the named event.
This is a noop if the named event already contains this EventReaction.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_dump(**kwargs: Any) dict[str, Any][source]
Wrap pydantic to ensure discriminators are serializers.
- on_assignment: list[Annotated[ActionSkipIfLookupResultChanged | ActionSendNotification | ActionUpdateCollectionWithArtifacts | ActionUpdateCollectionWithData | ActionRetryWithDelays | ActionRecordInTaskHistory, FieldInfo(annotation=NoneType, required=True, discriminator='action')]]
- on_creation: list[Annotated[ActionSkipIfLookupResultChanged | ActionSendNotification | ActionUpdateCollectionWithArtifacts | ActionUpdateCollectionWithData | ActionRetryWithDelays | ActionRecordInTaskHistory, FieldInfo(annotation=NoneType, required=True, discriminator='action')]]
- on_failure: list[Annotated[ActionSkipIfLookupResultChanged | ActionSendNotification | ActionUpdateCollectionWithArtifacts | ActionUpdateCollectionWithData | ActionRetryWithDelays | ActionRecordInTaskHistory, FieldInfo(annotation=NoneType, required=True, discriminator='action')]]
- on_success: list[Annotated[ActionSkipIfLookupResultChanged | ActionSendNotification | ActionUpdateCollectionWithArtifacts | ActionUpdateCollectionWithData | ActionRetryWithDelays | ActionRecordInTaskHistory, FieldInfo(annotation=NoneType, required=True, discriminator='action')]]
- on_unblock: list[Annotated[ActionSkipIfLookupResultChanged | ActionSendNotification | ActionUpdateCollectionWithArtifacts | ActionUpdateCollectionWithData | ActionRetryWithDelays | ActionRecordInTaskHistory, FieldInfo(annotation=NoneType, required=True, discriminator='action')]]
- class debusine.tasks.models.ExtraDebusineRepository(*, components: list[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(\\w|-)+$')])]] | None = None, suite: int | str)[source]
Bases:
BaseExtraRepositoryAn extra Debusine-hosted repository for Debian tasks.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.ExtraExternalRepository(*, components: list[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^(\\w|-)+$')])]] | None = None, url: Annotated[AnyUrl, UrlConstraints(max_length=None, allowed_schemes=None, host_required=True, default_host=None, default_port=None, default_path=None)], suite: Annotated[str, _PydanticGeneralMetadata(pattern='^(\\w|[./ -])+$')], signing_key: str | None = None)[source]
Bases:
BaseExtraRepositoryAn extra external repository for Debian tasks.
- as_deb822_source(signed_by_filename: str | None = None) str[source]
Render a Deb822 sources.list.d entry.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.ExtractForSigningData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', backend: BackendType = BackendType.AUTO, environment: int | str, build_architecture: str | None = None, input: ExtractForSigningInput)[source]
Bases:
BaseTaskDataWithExecutorIn-memory task data for the ExtractForSigning task.
- input: ExtractForSigningInput
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.ExtractForSigningDynamicData(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, environment_id: int, input_template_artifact_id: int, input_binary_artifacts_ids: list[int])[source]
Bases:
BaseDynamicTaskDataWithExecutorDynamic data for the ExtractForSigning task.
- get_input_artifacts_ids() list[int][source]
Return the list of input artifact IDs used by this task.
This is used by views to show what artifacts were used by a task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.ExtractForSigningInput(*, template_artifact: int | str, binary_artifacts: LookupMultiple)[source]
Bases:
BaseTaskDataModelInput for the ExtractForSigning task.
- binary_artifacts: LookupMultiple
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.ImageCacheUsageLog(*, version: int = 1, backends: set[~debusine.tasks.models.BackendType] = <factory>, usage: list[~debusine.tasks.models.ImageCacheUsageLogEntry] = <factory>)[source]
Bases:
BaseTaskDataModelUsage log for cached executor images.
- backends: set[BackendType]
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- usage: list[ImageCacheUsageLogEntry]
- class debusine.tasks.models.ImageCacheUsageLogEntry(*, filename: str, backend: BackendType | None = None, timestamp: datetime)[source]
Bases:
BaseTaskDataModelEntry in ImageCacheUsageLog for cached executor images.
- backend: BackendType | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.InputArtifactMultiple(*, label: str, lookup: ~debusine.tasks.models.LookupMultiple, artifacts: list[~debusine.tasks.models.BaseTaskInputArtifact] = <factory>)[source]
Bases:
BaseLabeledTaskInputRepresent declared multiple input artifacts for a task.
- artifacts: list[BaseTaskInputArtifact]
Artifact data if it’s already known
- classmethod from_ids(lookup: LookupMultiple, label: str, artifact_ids: Collection[int] | None) Self[source]
Create an InputArtifactMultiple from a list of artifact IDs.
- lookup: LookupMultiple
Lookup used to obtain the artifacts.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.InputArtifactSingle(*, label: str, artifact_id: int | None = None, category: ArtifactCategory | None = None, data: ArtifactData | None = None, lookup: int | str)[source]
Bases:
BaseInputArtifactSingleRepresent a declared single input artifact for a task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.InputCollectionSingle(*, label: str, lookup: int | str, collection_id: int, scope_name: str, workspace_name: str, category: CollectionCategory, name: str, data: dict[str, Any])[source]
Bases:
BaseLabeledTaskInputInformation about a collection.
- category: CollectionCategory
Category of the collection
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.LintianData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', backend: ~debusine.tasks.models.BackendType = BackendType.AUTO, environment: int | str | None = None, build_architecture: str | None = None, input: ~debusine.tasks.models.LintianInput, output: ~debusine.tasks.models.LintianOutput = <factory>, target_distribution: str = 'debian:unstable', include_tags: list[str] = <factory>, exclude_tags: list[str] = <factory>, fail_on_severity: ~debusine.tasks.models.LintianFailOnSeverity = LintianFailOnSeverity.ERROR)[source]
Bases:
BaseTaskDataWithExecutorIn memory task data for the Lintian task.
- fail_on_severity: LintianFailOnSeverity
- input: LintianInput
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- output: LintianOutput
- class debusine.tasks.models.LintianDynamicData(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, environment_id: int | None = None, input_source_artifact_id: int | None = None, input_binary_artifacts_ids: list[int] = <factory>)[source]
Bases:
BaseDynamicTaskDataWithExecutorDynamic data for the Lintian task.
- get_input_artifacts_ids() list[int][source]
Return the list of input artifact IDs used by this task.
This is used by views to show what artifacts were used by a task.
- get_source_package_name() str | None[source]
Extract the source package name.
- Returns:
the source package name, if applicable, and None otherwise.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.LintianFailOnSeverity(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for fail_on_severity.
- ERROR = 'error'
- EXPERIMENTAL = 'experimental'
- INFO = 'info'
- NONE = 'none'
- OVERRIDDEN = 'overridden'
- PEDANTIC = 'pedantic'
- WARNING = 'warning'
- class debusine.tasks.models.LintianInput(*, source_artifact: int | str | None = None, binary_artifacts: ~debusine.tasks.models.LookupMultiple = <factory>)[source]
Bases:
BaseTaskDataModelInput for a lintian task.
- binary_artifacts: LookupMultiple
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.LintianOutput(*, source_analysis: bool = True, binary_all_analysis: bool = True, binary_any_analysis: bool = True)[source]
Bases:
BaseTaskDataModelOutput configuration for a Lintian task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.LookupDict(*, collection: int | str, child_type: LookupChildType = LookupChildType.ARTIFACT, category: str | None = None, name_matcher: CollectionItemMatcher | None = None, data_matchers: tuple[tuple[str, CollectionItemMatcher], ...] = (), lookup_filters: tuple[tuple[str, int | str | LookupMultiple], ...] = ())[source]
Bases:
BaseTaskDataModelDictionary lookups for collection items.
- child_type: LookupChildType
- data_matchers: tuple[tuple[str, CollectionItemMatcher], ...]
- export() dict[str, Any][source]
Export the usual input representation of this lookup.
This reverses the transformations applied by
normalize_matchers().
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name_matcher: CollectionItemMatcher | None
- classmethod normalize_matchers(data: Any) dict[str, Any][source]
Transform the lookup syntax into a form more convenient for pydantic.
name, name__*, data__KEY, and data__KEY__* keys in values are transformed into
CollectionItemMatcherinstances stored in name_matcher and data_matchers. lookup__KEY keys are transformed into entries in lookup_filters. Conflicting lookup suffixes are rejected.
- class debusine.tasks.models.LookupMultiple(root: RootModelRootType = PydanticUndefined)[source]
Bases:
]]Lookups resulting in multiple collection items.
- export() dict[str, Any] | list[int | str | dict[str, Any]][source]
Export the usual input representation of this lookup.
This reverses the transformations applied by
normalize().
- model_config: ClassVar[ConfigDict] = {'frozen': True, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.MakeSourcePackageUploadData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', backend: BackendType = BackendType.AUTO, environment: int | str, build_architecture: str | None = None, input: MakeSourcePackageUploadInput, since_version: str | None = None, target_distribution: str | None = None)[source]
Bases:
BaseTaskDataWithExecutorIn memory task data for the MakeSourcePackageUpload task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.MakeSourcePackageUploadDynamicData(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, environment_id: int, input_source_artifact_id: int)[source]
Bases:
BaseDynamicTaskDataWithExecutorExpanded dynamic data for the MakeSourcePackageUpload task.
- get_input_artifacts_ids() list[int][source]
Return the list of input artifact IDs used by this task.
This is used by views to show what artifacts were used by a task.
- get_source_package_name() str | None[source]
Extract the source package name.
- Returns:
the source package name, if applicable, and None otherwise.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.MakeSourcePackageUploadInput(*, source_artifact: int | str)[source]
Bases:
BaseTaskDataModelInput for a MakeSourcePackageUpload task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.MergeUploadsData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', backend: BackendType = BackendType.AUTO, environment: int | str | None = None, input: MergeUploadsInput)[source]
Bases:
BaseTaskDataIn memory task data for the MergeUploads task.
- backend: BackendType
- input: MergeUploadsInput
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.MergeUploadsDynamicData(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, environment_id: int | None = None, input_uploads_ids: list[int])[source]
Bases:
BaseDynamicTaskDataExpanded dynamic data for the MergeUploads task.
- get_input_artifacts_ids() list[int][source]
Return the list of input artifact IDs used by this task.
This is used by views to show what artifacts were used by a task.
- get_source_package_name() str | None[source]
Extract the source package name.
- Returns:
the source package name, if applicable, and None otherwise.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.MergeUploadsInput(*, uploads: LookupMultiple)[source]
Bases:
BaseTaskDataModelInput for a MergeUploads task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- uploads: LookupMultiple
- class debusine.tasks.models.MmDebstrapBootstrapOptions(*, architecture: str, variant: ~debusine.tasks.models.MmDebstrapVariant | None = None, extra_packages: list[str] = <factory>, use_signed_by: bool = True)[source]
Bases:
SystemBootstrapOptionsStructure of MmDebstrap options.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- variant: MmDebstrapVariant | None
- class debusine.tasks.models.MmDebstrapData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', bootstrap_options: MmDebstrapBootstrapOptions, bootstrap_repositories: Annotated[list[SystemBootstrapRepository], MinLen(min_length=1)], customization_script: str | None = None)[source]
Bases:
SystemBootstrapDataIn memory task data for the MmDebstrap task.
- bootstrap_options: MmDebstrapBootstrapOptions
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.MmDebstrapVariant(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumVariants supported by mmdebstrap.
- APT = 'apt'
- BUILDD = 'buildd'
- CUSTOM = 'custom'
- DASH = '-'
- DEBOOTSTRAP = 'debootstrap'
- ESSENTIAL = 'essential'
- EXTRACT = 'extract'
- IMPORTANT = 'important'
- MINBASE = 'minbase'
- REQUIRED = 'required'
- STANDARD = 'standard'
- class debusine.tasks.models.NoopData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', backend: BackendType = BackendType.AUTO, environment: int | str | None = None, build_architecture: str | None = None, result: WorkRequestResults = WorkRequestResults.SUCCESS)[source]
Bases:
BaseTaskDataWithExecutorIn memory task data for the Noop task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- result: WorkRequestResults
- class debusine.tasks.models.NotificationDataEmail(*, from_: ~pydantic.networks.EmailStr | None = None, to: list[~pydantic.networks.EmailStr] | None = None, cc: list[~pydantic.networks.EmailStr] = <factory>, subject: str | None = None)[source]
Bases:
BaseTaskDataModelChannel data for email notifications.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.OutputData(*, runtime_statistics: RuntimeStatistics | None = None, errors: list[OutputDataError] | None = None, skip_reason: str | None = None, regression_analysis: dict[str, RegressionAnalysis] | None = None, confirmation: Confirmation | None = None)[source]
Bases:
BaseTaskDataModelData produced when a task is completed.
- confirmation: Confirmation | None
- errors: list[OutputDataError] | None
- merge(other: OutputData) OutputData[source]
Return the combination of two
OutputDataobjects.Merge all the fields that were explicitly set on each model. If a field is set on both models, the values in
othertake precedence.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- regression_analysis: dict[str, RegressionAnalysis] | None
- class debusine.tasks.models.OutputDataError(*, message: str, code: str)[source]
Bases:
BaseTaskDataModelAn error encountered when running a task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.Partition(*, size: int, filesystem: str, mountpoint: str = 'none')[source]
Bases:
BaseTaskDataModelPartition definition.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.PiupartsData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', extra_repositories: list[ExtraDebusineRepository | ExtraExternalRepository] | None = None, backend: BackendType = BackendType.AUTO, environment: int | str, build_architecture: str, input: PiupartsDataInput, base_tgz: int | str)[source]
Bases:
BaseTaskDataWithExecutor,BaseTaskDataWithExtraRepositoriesIn memory task data for the Piuparts task.
- input: PiupartsDataInput
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.PiupartsDataInput(*, binary_artifacts: LookupMultiple)[source]
Bases:
BaseTaskDataModelInput for a piuparts task.
- binary_artifacts: LookupMultiple
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.PiupartsDynamicData(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, extra_repositories: list[~debusine.tasks.models.ExtraExternalRepository] | None = None, environment_id: int, input_binary_artifacts_ids: list[int], base_tgz_id: int)[source]
Bases:
BaseDynamicTaskDataWithExecutor,BaseDynamicTaskDataWithExtraRepositoriesDynamic data for the Piuparts task.
- get_input_artifacts_ids() list[int][source]
Return the list of input artifact IDs used by this task.
This is used by views to show what artifacts were used by a task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.RegressionAnalysis(*, original_source_version: str | None = None, original_artifact_id: int | None = None, new_source_version: str | None = None, new_artifact_id: int | None = None, status: RegressionAnalysisStatus, details: dict[str, Any] | list[Any] | None = None, original_url: str | None = None, new_url: str | None = None)[source]
Bases:
BaseTaskDataModelThe result of a regression analysis.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- status: RegressionAnalysisStatus
- class debusine.tasks.models.RegressionAnalysisStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for
RegressionAnalysis.status.- ERROR = 'error'
- IMPROVEMENT = 'improvement'
- NO_RESULT = 'no-result'
- REGRESSION = 'regression'
- STABLE = 'stable'
- class debusine.tasks.models.SbuildBinNMU(*, changelog: str, suffix: str, timestamp: datetime | None = None, maintainer: NameEmail | None = None)[source]
Bases:
BaseTaskDataModelbinmu for a sbuild task.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.SbuildBuildComponent(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for build_components.
- ALL = 'all'
- ANY = 'any'
- SOURCE = 'source'
- class debusine.tasks.models.SbuildBuildDepResolver(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for build_dep_resolver.
- APT = 'apt'
- APTITUDE = 'aptitude'
- ASPCUD = 'aspcud'
- XAPT = 'xapt'
- class debusine.tasks.models.SbuildData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', extra_repositories: list[~debusine.tasks.models.ExtraDebusineRepository | ~debusine.tasks.models.ExtraExternalRepository] | None = None, backend: ~debusine.tasks.models.BackendType = BackendType.AUTO, environment: int | str, build_architecture: str, input: ~debusine.tasks.models.SbuildInput, build_components: list[~debusine.tasks.models.SbuildBuildComponent] = <factory>, binnmu: ~debusine.tasks.models.SbuildBinNMU | None = None, build_profiles: list[str] | None = None, build_dep_resolver: ~debusine.tasks.models.SbuildBuildDepResolver | None = None, aspcud_criteria: str | None = None, resolve_alternatives: bool = False)[source]
Bases:
BaseTaskDataWithExecutor,BaseTaskDataWithExtraRepositoriesIn memory task data for the Sbuild task.
- binnmu: SbuildBinNMU | None
- build_components: list[SbuildBuildComponent]
- build_dep_resolver: SbuildBuildDepResolver | None
- check_binnmu_against_components() Self[source]
Binnmus are incompatible with architecture-independent builds.
- input: SbuildInput
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.SbuildDynamicData(*, parameter_summary: str | None = None, subject: str | None = None, runtime_context: str | None = None, configuration_context: str | None = None, task_input_fields: dict[str, ~typing.Any] = <factory>, extra_repositories: list[~debusine.tasks.models.ExtraExternalRepository] | None = None, environment_id: int | None = None, input_source_artifact_id: int, input_extra_binary_artifacts_ids: list[int] = <factory>, binnmu_maintainer: str | None = None)[source]
Bases:
BaseDynamicTaskDataWithExecutor,BaseDynamicTaskDataWithExtraRepositoriesDynamic data for the Sbuild task.
- get_input_artifacts_ids() list[int][source]
Return the list of input artifact IDs used by this task.
This is used by views to show what artifacts were used by a task.
- get_source_package_name() str | None[source]
Extract the source package name.
- Returns:
the source package name, if applicable, and None otherwise.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.SbuildInput(*, source_artifact: int | str, extra_binary_artifacts: ~debusine.tasks.models.LookupMultiple = <factory>)[source]
Bases:
BaseTaskDataModelInput for a sbuild task.
- extra_binary_artifacts: LookupMultiple
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.SystemBootstrapData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', bootstrap_options: SystemBootstrapOptions, bootstrap_repositories: Annotated[list[SystemBootstrapRepository], MinLen(min_length=1)], customization_script: str | None = None)[source]
Bases:
BaseTaskDataBase for in-memory class data for SystemBootstrap tasks.
- bootstrap_options: SystemBootstrapOptions
- bootstrap_repositories: Annotated[list[SystemBootstrapRepository], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.SystemBootstrapOptions(*, architecture: str, variant: str | None = None, extra_packages: list[str] = <factory>, use_signed_by: bool = True)[source]
Bases:
BaseTaskDataModelStructure of SystemBootstrap options.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.SystemBootstrapRepository(*, mirror: str, suite: str, types: ~typing.Annotated[list[~debusine.tasks.models.SystemBootstrapRepositoryType], ~annotated_types.MinLen(min_length=1), ~pydantic.functional_validators.AfterValidator(func=~debusine.tasks.models.require_unique)] = <factory>, components: ~typing.Annotated[list[str], ~pydantic.functional_validators.AfterValidator(func=~debusine.tasks.models.require_unique)] | None = None, check_signature_with: ~debusine.tasks.models.SystemBootstrapRepositoryCheckSignatureWith = SystemBootstrapRepositoryCheckSignatureWith.SYSTEM, keyring_package: str | None = None, keyring: ~debusine.tasks.models.SystemBootstrapRepositoryKeyring | None = None)[source]
Bases:
BaseTaskDataModelDescription of one repository in SystemBootstrapData.
- check_signature_with: SystemBootstrapRepositoryCheckSignatureWith
- keyring: SystemBootstrapRepositoryKeyring | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- types: Annotated[list[SystemBootstrapRepositoryType], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)]), AfterValidator(func=require_unique)]
- class debusine.tasks.models.SystemBootstrapRepositoryCheckSignatureWith(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for check_signature_with.
- EXTERNAL = 'external'
- NO_CHECK = 'no-check'
- SYSTEM = 'system'
- class debusine.tasks.models.SystemBootstrapRepositoryKeyring(*, url: AnyUrl, sha256sum: str = '', install: bool = False)[source]
Bases:
BaseTaskDataModelDescription of a repository keyring.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- url: AnyUrl
- class debusine.tasks.models.SystemBootstrapRepositoryType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnumPossible values for repository types.
- DEB = 'deb'
- DEB_SRC = 'deb-src'
- class debusine.tasks.models.SystemImageBuildData(*, task_configuration: int | str | None = 'default@debusine:task-configuration', bootstrap_options: DebootstrapBootstrapOptions, bootstrap_repositories: Annotated[list[SystemBootstrapRepository], MinLen(min_length=1)], customization_script: str | None = None, disk_image: DiskImage)[source]
Bases:
SystemBootstrapDataBase for in-memory class data for SystemImageBuild tasks.
- bootstrap_options: DebootstrapBootstrapOptions
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class debusine.tasks.models.WorkerType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
DjangoChoicesEnumThe type of a Worker.
- CELERY = 'celery'
- EXTERNAL = 'external'
- SCHEDULER = 'scheduler'
- SIGNING = 'signing'
- debusine.tasks.models.build_key_value_lookup_segment(lookup_type: str, filters: dict[str, str]) str[source]
Build a lookup segment consisting of a series of key=value filters.
- debusine.tasks.models.build_lookup_string(*segments: str, options: dict[str, Any] | None = None) str[source]
Build a string lookup from segments and options.
- debusine.tasks.models.parse_key_value_lookup_segment(segment: str) tuple[str, dict[str, str]][source]
Parse a lookup segment consisting of a series of key=value filters.