httk.workflow.hygiene¶
Describe and repair a project’s remotes, and check its workspace health.
Everything here answers an operator question about state that already exists:
what is this remote configured to do, what is wrong with this workspace and
can it be fixed. Nothing here is on the execution path of a job. The individual
workspace checks are the ones the project-member repair and scan_project
surface through core’s httk project repair; each repair is explicit.
Attributes¶
Classes¶
Describe one thing the check looked at and what it found. |
Functions¶
|
Describe one remote: where it lives, what it is, how it is configured. |
|
Remove one remote bundle, refusing while a transfer still needs it. |
Module Contents¶
- httk.workflow.hygiene.REMOTE_DESCRIPTION_FORMAT = 'httk-remote-description'¶
- httk.workflow.hygiene.TMP_MAXIMUM_AGE_SECONDS = 86400¶
- httk.workflow.hygiene.describe_remote(name, *, project=None)¶
Describe one remote: where it lives, what it is, how it is configured.
Credential values never appear. A remote’s settings are reported with the file each one came from, and for a setting stored in the manifest-excluded
credentials.jsononly its name is reported: a description an operator can paste into a bug report must never carry a password.- Parameters:
name (str) – Remote bundle name.
project (str | os.PathLike[str] | None) – Project directory used for project-local lookup.
- Returns:
JSON-compatible remote description.
- Raises:
ValueError – If the remote name is invalid or unknown.
- Return type:
- httk.workflow.hygiene.remove_remote(name, *, project=None)¶
Remove one remote bundle, refusing while a transfer still needs it.
A sealed bundle that has not been acknowledged is work this remote still owes an answer about, and the adapter is how that answer is fetched. Removing the remote would leave the transfer with no way home, so it is refused by name — retire or fetch the transfer first.
- Parameters:
name (str) – Remote bundle name.
project (str | os.PathLike[str] | None) – Project directory used for project-local lookup.
- Returns:
JSON-compatible removal result.
- Raises:
ValueError – If the remote is invalid, unknown, or still has transfers.
- Return type:
- class httk.workflow.hygiene.Finding¶
Describe one thing the check looked at and what it found.
- Parameters:
check – Check name.
status – Check result status.
message – Human-readable result.
repairable – Whether the finding can be repaired automatically.
repaired – Whether this run repaired the finding.
action – Repair action, when one was taken.
details – Structured result details.