diff --git a/changelog.d/ITL-1965.md b/changelog.d/ITL-1965.md new file mode 100644 index 000000000..e7ec27680 --- /dev/null +++ b/changelog.d/ITL-1965.md @@ -0,0 +1,9 @@ +### Added + +- `PipelineRepository` publishes saved jobs under an optional repository name + and author, lists committed publications, and loads the latest or a specific + version with `load(name, ver=...)`. Publications carry a `pipeline_json_v1` + job hash that includes saved bindings and node identities. Run status and + other advisory run fields do not create a new version on their own. + Pass `read_only=True` to load a publication as a provisional + `SourceOnlyPipelineJob` with access to its stored node results. diff --git a/docs/api/pipeline.md b/docs/api/pipeline.md index a99945d0c..52751a833 100644 --- a/docs/api/pipeline.md +++ b/docs/api/pipeline.md @@ -15,6 +15,12 @@ blueprint; `PipelineJob` binds a pipeline to sources and a database and runs it. ::: orcapod.pipeline.SourceOnlyPipelineJob +::: orcapod.pipeline.PipelineRepository + +::: orcapod.pipeline.PipelinePublication + +::: orcapod.pipeline.PipelinePublicationConflictError + ::: orcapod.pipeline.PipelineDiagram ::: orcapod.pipeline.LoadStatus diff --git a/docs/concepts/pipeline-job.md b/docs/concepts/pipeline-job.md index 18f3e51c0..6b3eada62 100644 --- a/docs/concepts/pipeline-job.md +++ b/docs/concepts/pipeline-job.md @@ -718,6 +718,85 @@ Delta matches these option names case-insensitively. | OpenDAL Google Cloud and TOS options | `opendal.google_service_account_key`, `opendal.tos_secret_access_key`, `opendal.tos_security_token`, `opendal.volcengine_secret_access_key`, `opendal.volcengine_session_token` | | Other OpenDAL names | `opendal.access_key`, `opendal.access_key_secret`, `opendal.account_key`, `opendal.application_key`, `opendal.client_secret`, `opendal.credential`, `opendal.delegation`, `opendal.encryption_key`, `opendal.master_key`, `opendal.password`, `opendal.sas_key`, `opendal.sas_token`, `opendal.secret_access_key`, `opendal.secret_key`, `opendal.security_token`, `opendal.service_account_key`, `opendal.session_token`, `opendal.temp_url_key`, `opendal.token` | +## Publishing jobs to a repository + +`PipelineRepository` stores saved jobs in a database so you can list them by +name and load them later. The repository holds the same saved text as +`PipelineJob.save`. For persisted node results, the loaded job uses its saved +database bindings or the overrides you pass to `load`. + +```python +from orcapod import PipelineRepository + +repository_database = InMemoryArrowDatabase() +repository = PipelineRepository(repository_database) +publication = repository.publish( + job, name=("examples", "daily"), description="Daily BMI calculation" +) + +reader = PipelineRepository(repository_database) +entries = reader.list_pipelines(prefix=("examples", "daily")) +print([(entry.name, entry.version) for entry in entries]) +# [(('examples', 'daily'), 1)] + +published_job = reader.load(publication.name, ver=publication.version, database=database) +rows = published_job.nodes["bmi"].as_source().as_table().sort_by("subject_id") +print(rows["subject_id"].to_pylist()) +# ['mouse_02', 'mouse_03', 'mouse_11'] + +published_sources = reader.load(publication.name, read_only=True, database=database) +rows = published_sources.nodes["bmi"].as_table().sort_by("subject_id") +print(rows["subject_id"].to_pylist()) +# ['mouse_02', 'mouse_03', 'mouse_11'] +``` + +The repository name defaults to the job's pipeline name. Supply `name` to +publish the same saved job under another name. The loaded job keeps its +original pipeline name. Publish a changed job under the same repository name +to create the next version. If the job matches the latest publication's +whole-job hash, `publish` returns that publication with its original metadata. +Use `list_versions(name)` for the history and `load(name, ver=...)` for a +specific version. Omitting `ver` loads the latest version. +Publishing hashes the job's recorded bindings and node identities, including +its database locations. A change confined to the run ID, status, unbound-source +list, or advisory row counts keeps the same version. Changes to input rows that +leave the saved job's identities unchanged also keep the same version. + +`list_pipelines(prefix=("measurements",))` matches whole leading name components. +A string such as `"bmi"` is equivalent to the one-component tuple `("bmi",)`. +Listings include the version, UTC publication time, `pipeline_json_v1` job hash, +function node labels, author, and optional description. Set `author` explicitly or let it +default to the PostgreSQL session user or authenticated SpiralDB principal. +When the backend cannot report an identity, the default is `None`. + +Publish to each repository name from one writer at a time. If two writers +choose the same version, the store can reject the duplicate while adding it. +If both reach the commit step, `publish` verifies the committed version. +It returns the stored entry for identical saved snapshots and raises +`PipelinePublicationConflictError` if a different snapshot won. The losing +writer can retry to publish against the current version. +If a flush fails before committing, retry the same publication on the same +repository instance to reuse its original saved text and publication metadata. +If the write committed and only readback failed, the retry returns that +publication even if a newer version now exists. + +List and load use read-only operations on committed entries in the repository's +own storage. For SpiralDB, a viewer opens the repository with +`SpiralDBKeyedConnector(..., writable=True)` to select the keyed table format +(ITL-1961, ITL-1962). + +Load only publications from publishers you would trust to give you a saved job +file. As with `PipelineJob.load`, loading a publication reconstructs its saved +database bindings under the reader's authority. For example, opening a saved +local Delta binding can create its missing directory (ITL-1967). + +A loaded job can run in `load_only=True` mode, and nodes with stored results +expose them through their stored views without importing the original function +modules. +Pass `read_only=True` with either the latest or a pinned version to get a +provisional `SourceOnlyPipelineJob` with stored sources, saved labels, and +the reasons other nodes are unavailable. + ## How it connects to other concepts - A job records applications of [Function Pods](function-pods.md) and diff --git a/docs/dev/specs/itl-1965-pipeline-repository.md b/docs/dev/specs/itl-1965-pipeline-repository.md new file mode 100644 index 000000000..c2a66a7a8 --- /dev/null +++ b/docs/dev/specs/itl-1965-pipeline-repository.md @@ -0,0 +1,246 @@ +# Pipeline repository (ITL-1965) + +A pipeline repository publishes and retrieves saved `PipelineJob` snapshots using +any record-storing `ArrowDatabaseProtocol` implementation. The repository database +holds the saved job text and publication metadata. The job's own database bindings +still determine where its node results live. + +## Public API + +Define `PipelineRepository` and the immutable `PipelinePublication` dataclass in +`orcapod.pipeline.repository`. Export both from `orcapod.pipeline` and `orcapod`, +alongside `PipelineJob`. + +```python +@dataclass(frozen=True) +class PipelinePublication: + name: tuple[str, ...] + version: int + published_at: datetime + job_hash: str + function_nodes: tuple[str, ...] + author: str | None + description: str | None + +class PipelineRepository: + def __init__(self, database: ArrowDatabaseProtocol) -> None: ... + def publish( + self, + job: PipelineJob, + name: str | tuple[str, ...] | None = None, + author: str | None = None, + description: str | None = None, + ) -> PipelinePublication: ... + def list_pipelines( + self, *, prefix: str | tuple[str, ...] = () + ) -> list[PipelinePublication]: ... + def list_versions(self, name: str | tuple[str, ...]) -> list[PipelinePublication]: ... + def load( + self, + name: str | tuple[str, ...], + ver: int | None = None, + *, + read_only: bool = False, + database: ArrowDatabaseProtocol | None = None, + result_database: ArrowDatabaseProtocol | None = None, + ) -> PipelineJob | SourceOnlyPipelineJob: ... +``` + +- `publish(job)` uses the job's current `name`. An explicit name overrides + the repository entry's name while preserving the saved job text and the + pipeline name it contains. It raises `ValueError` if the + name has no components or an empty component. The usual default `("pipeline",)` + is a name. Save errors propagate and leave the repository untouched. A database + that explicitly discards records is refused on publication. +- `list_pipelines()` returns each name once, with its highest version and that + publication's UTC timestamp. It sorts by name tuple and returns `[]` for an + empty repository. A prefix matches whole leading components. `prefix="sales"` + matches `("sales", "daily")` and `("sales",)`. The empty tuple lists all names. + `list_versions(name)` returns that name's publications in ascending version + order, or `[]` if the name is unknown. +- `load(name)` loads the highest version. `load(name, ver=N)` loads that + version. An unknown name or version raises `KeyError` identifying the requested + name and version where applicable. An explicit version must be a positive + integer. Invalid names and version arguments raise `ValueError`. +- `load` uses the same database overrides, binding rules and validation as + `PipelineJob.load`. Pass the original in-memory results database or the + appropriate connector database explicitly when needed. Loaded jobs read stored + results and may run only with `load_only=True`. Pass `read_only=True` to + return the provisional `SourceOnlyPipelineJob` from the ITL-1966 loader, + with stored sources, saved labels, and reasons for unavailable nodes. + This works for the latest publication and for a pinned version. +- Load only publications from publishers you would trust to give you a saved + job file. The file loader reconstructs the publisher's saved bindings under + the reader's authority. For example, opening a saved local Delta binding can + create its missing directory (ITL-1967). +- Listings and `publish` return the labelled job hash, the sorted function node + labels, author, and optional description. The optional `author` overrides + the publishing identity, which defaults to `None` if unavailable. The + identical-job no-op preserves the existing metadata. + +## Stored table + +Use one table at `("_pipeline_repository", "prdb_v1")` relative to the supplied +database view. Callers can use `database.at(...)` for separate repositories. Declare +`PIPELINE_REPOSITORY_SCHEMA_VERSION = "prdb_v1"` in `system_constants.py` and register +it in `contexts.stored.CURRENT_LAYOUTS`. Open only the current layout path. + +| Column | Arrow type | Meaning | +| --- | --- | --- | +| `__record_id` | `large_binary` | Database key for one publication | +| `pipeline_name` | `large_string` | Canonical JSON array of name components | +| `version` | `int64` | Version, starting at 1 for each name in the current data context | +| `published_at` | `large_string` | UTC time in ISO 8601 with microseconds and `+00:00`, decoded as a timezone-aware `datetime` | +| `job_hash` | `large_string` | Labelled whole-job hash text | +| `function_nodes` | `large_string` | JSON array of sorted function node labels | +| `author` | `large_string`, nullable | Explicit author or authenticated publishing identity when available | +| `description` | `large_string`, nullable | Optional free text supplied by the publisher | +| `saved_job` | `large_string` | Full text produced by `PipelineJob.save` | +| `__data_context` | `large_string` | Repository writer's current default data context key | + +The remaining fields are non-nullable. Use `contexts.stored.with_data_context` to add the +context column. A string name is one component, so `"sales"` and `("sales",)` +identify the same name. `"sales/daily"` and `("sales", "daily")` identify distinct +names. Encode the tuple as compact, ASCII-escaped JSON. Preserve case, component +order and whitespace. Names are values in the table and never become table path +components. The record id is the UTF-8 encoding of a compact, ASCII-escaped JSON +array `[context_key, name_components, version]`, where `name_components` is a +nested array. The context in the key lets rows from different contexts coexist. +Use plain timestamp text because SQLite cannot store an Arrow timestamp. + +Refresh the table before looking up publications. Metadata reads filter by +`__data_context` and, for one name, by `pipeline_name`. Prefix matching compares +the decoded tuple components. Request only metadata columns. Extract function +node labels from the saved blueprint during publication, including function nodes +that take an invocation context. Listing never parses or reconstructs a job. +The keyed SpiralDB adapter requests only the physical columns needed for the +projection and its predicates. An exact load uses the database record key and checks the row's +context. Listing and loading read only committed entries, including when the +table has never been created. They perform no flush, table creation, or metadata +write against repository storage. After a flush attempt, the writer withdraws +its candidate from the pending queue if it is still there and checks committed +storage for the outcome. Publishing the same job to the same name on the same +repository instance restages a failed candidate with its original saved text +and metadata. The table is created by the first successful insert. +Reconstructing the job's own bindings follows `PipelineJob.load` and can create +a missing local Delta directory (ITL-1967). Publish reads the +highest version for the name, adds one row through the database protocol, and +flushes it before returning. Version order determines the latest publication even +when publication clocks tie or move backwards. + +V1 assumes one publisher per name because the database protocol allocates +no atomic per-name sequence. Two writers that both observe version N pick the +same record key for N+1. The add step rejects a committed duplicate on +in-memory, Delta Lake, SQLite, and keyed SpiralDB (verified with the fake SDK). +The in-memory backend also rejects a duplicate in its shared pending queue. +If two independent queues accept the key before either commits, Delta Lake, +SQLite, and the fake keyed SpiralDB backend keep the first committed row and +skip the other. PostgreSQL uses the same commit-time rule with +`ON CONFLICT DO NOTHING`. In the tested interleavings, the earlier version and +entries under other names are preserved. After flushing, `publish` reads the +committed row. If the saved text and job hash match, it returns the stored +metadata. Otherwise it raises `PipelinePublicationConflictError` so the +caller can publish again against the current version. + +## Shared saved-job format + +`PipelineJob.save` currently writes indented JSON. Store that exact text, which +is also valid YAML 1.2, in `saved_job`. Extract the existing job text writer and +reader into private shared code. File save writes the same text the repository +stores, and both file load and repository load pass their text through the same +parser and reconstruction logic. Keep the public file signatures and file format +as they are. The repository adds publication metadata outside the saved text and +stores no copies of source data or node results. Read-only database opening and +sharing are outside this spec. + +## Duplicate publication decision + +| Option | Consequences | +| --- | --- | +| Refuse a repeated name | Uses the existing insert semantics, but callers need to choose a new name each time they publish an update. | +| Replace the previous row | Keeps one row per name and bounds storage. A portable replacement would require a new operation on `ArrowDatabaseProtocol`. Previous publications would be lost. | +| Append a version | Uses the existing insert operation. A name stays stable across updates, previous publications stay available, and storage grows with every publication. | + +The developer selected append when the job differs from the name's latest +publication. Publishing the same job as the latest publication returns the +existing metadata, including its original timestamp, without writing or +flushing. A job that matches only an older publication gets a new version. +Earlier versions remain available by number. + +## Whole-job hash + +The existing run snapshot hashes the sorted content hashes of sink nodes in the +execution DAG and uses the first 16 hex characters in the run URI. It represents +the selected sinks' lineage and data state. It omits job and database configuration, +and node content hashes omit the name chain that distinguishes node labels. Node +hashes include the name chain and pipeline definition but omit bound input data. +Neither recipe covers the whole saved job. The saved form carries the graph and +labels, per-node identities and configuration, source bindings and their recorded +identities, database bindings, and saved run state. + +Hash the canonical saved document. Parse the same JSON text stored in +`saved_job`, remove `orcapod_version` at the job and embedded blueprint levels, and +remove `run.run_id`, `run.expected_rows`, `run.status`, and `run.unbound_sources`. +Retain both file format versions, the rest of the blueprint, all bindings +(including `bindings.database` and `bindings.result_database`), and +`run.node_job_content_hashes`. Sort the blueprint's edge pairs, which describe +connectivity. Preserve arrays carrying declared argument, schema or key order. +Use `hashing.labelled_hash.canonical_json` so mapping insertion order and JSON +formatting do not affect the digest. Existing embedded hashes keep their labels. + +Two saves of the same unchanged job in the same environment are expected to write +identical bytes. A save creates no timestamp or run id. A fresh run generates a +random run id, and its expected row counts are advisory. Save writes source +bindings in name order and writes the already-compiled graph's order. The file is +not a canonical encoding across independently built jobs. Source and database +paths are serialized as the existing bindings report them, so their saved path +text may differ across environments. The hash preserves that text. + +Changing a node label, saved source binding, or saved job or result database +binding should create a version because the loaded job may expose different nodes +or read different data. A data change counts when it changes a saved identity. +An explicitly named in-memory source can change its rows while keeping its source +and node identities, so those row changes alone keep the same publication. +Switching between in-memory database +objects with identical saved configurations is indistinguishable to the saved +form. A pending job becoming complete keeps its publication version when the +saved bindings and node identities still match. Changes confined to the omitted +run fields, runtime-only state outside the file, or the repository's timestamp +leave the version alone. + +The algorithm declares `PIPELINE_JSON_HASH_LABEL = "pipeline_json_v1"` +in `orcapod.pipeline.repository`, beside `_publication_hash`. Its digest is +SHA-256 of the canonical UTF-8 JSON bytes of the document defined above. Store +`ContentHash.to_string()` in a new non-null `job_hash: large_string` column, with +the same `prdb_v1` layout because it has never shipped. Add a label and a producing +site entry to the inventory in `docs/reference/hashing.md`, identifying this as +the saved-job publication hash, and list `PipelineRepository.publish` as the +labelled-value write site. + +## Requested capabilities + +| Request | Recommendation | Reason and cost | +| --- | --- | --- | +| Read a published job's stored results without the publisher's function modules | v1 | `Pipeline.load` reconstructs function descriptors with `function_pod=None`, and the job loader attaches their saved result bindings. Exercise a published graph in a fresh subprocess after deleting the pod module. The same file-load rules still apply to in-memory source data, uncached operators, side-effect rows and unavailable custom types. | +| Let a viewer identity list and load with no writable flag | v1 for viewer access, later for flag-free opening | A fake-backed reproduction confirmed that the plain connector uses a different naming rule. The v1 viewer uses `writable=True` to select the keyed database format. Listing and loading issue only reads. ITL-1961 and ITL-1962 cover the opening modes. | +| Cheap listing of name, version, date, hash, function names and output schemas | v1 for metadata and function labels, later for output schemas | Project one column per field. Labels come directly from the saved blueprint. A stable public schema type would require choices about Arrow types, nullable fields and unavailable custom types. Retaining schema descriptors also duplicates potentially wide metadata. | +| Keep tuple names and filter by component prefix | v1 | Match tuple components in the projected listing. Backend-side prefix matching would need more than equality predicates or a separate index. | +| Default the author to the verified publishing identity | v1 | When no author is supplied, PostgreSQL uses `SESSION_USER` and SpiralDB uses the pinned SDK's `authorization.read_caller()` response as `:`. SQLite, in-memory and Delta have no identity accessor and default to `None`. | +| Allocate distinct versions to concurrent publishers and make the identical-hash no-op race-safe | later | In-memory stores share queues within a handle family, SQLite and PostgreSQL can ignore a conflicting primary key, Delta can merge on the record id, and keyed SpiralDB uses a single writer. None of those operations atomically couples the latest hash check with sequence allocation through `ArrowDatabaseProtocol`. This requires a new concurrency contract and backend-specific support. | +| Pin by version or select the latest as of a time | v1 for exact version, later for time lookup | Exact version uses the record key. Time lookup adds decisions about ties, clock skew and backdated publications. Callers can inspect recorded times through `list_versions`. | +| Show an optional publication description in listings | v1 | Store a nullable text column and take an optional argument. The no-op rule preserves the existing publication and its metadata. | +| Unpublish or retire a version | later | Keep earlier versions by default. Removal needs a portable delete capability or a retirement marker and rules for latest-version selection and existing pins. | + +## Verification + +Through the public API, run and publish multiple named jobs on in-memory, Delta +Lake, SQLite and fake SpiralDB databases. Use fresh repository objects to check +listing, exact and latest version loads, and persisted node results. Include both +name forms, names that would collide if joined with a delimiter, repeated +publication, and unknown names and versions. Compare the stored text and load +behavior with the existing file API, including the `load_only=True` requirement. +For source-only loads, compare the latest and pinned publications' labels and +unavailable nodes with the file loader and their sources with the original jobs. +Cover PostgreSQL if its existing fixtures support the same test with little setup. +On fake SpiralDB, record mutating calls and verify that listing and loading never +make any, both when the repository is empty and when it holds publications. diff --git a/docs/reference/hashing.md b/docs/reference/hashing.md index 08a4063fd..b917da3ba 100644 --- a/docs/reference/hashing.md +++ b/docs/reference/hashing.md @@ -87,6 +87,7 @@ Hash labels: | `polars_series_v1` | the Polars Series value hash (ยง1e) | `PolarsSeriesHandler.HASH_LABEL`, `hashing/semantic_hashing/builtin_handlers.py` | | `function_signature_v1` | the stored function signature hash: a function's declared interface ([Data function types](data-function-types.md)) | `FUNCTION_SIGNATURE_HASH_LABEL`, `core/data_function.py` | | `function_content_v1` | the stored function content hash: its source text from the `def` line on ([Data function types](data-function-types.md)) | `FUNCTION_CONTENT_HASH_LABEL`, `core/data_function.py` | +| `pipeline_json_v1` | canonical saved job JSON with sorted blueprint edges, including bindings and node job content hashes and omitting package versions, the run ID, run status, unbound sources, and advisory row counts | `PIPELINE_JSON_HASH_LABEL`, `pipeline/repository.py` | | `batch_v1` | the folded source id and record id of `Batch` (site 6b) | `BATCH_FOLD_LABEL`, `core/operators/batch.py` | | `group_v1` | the folded source id and record id of `GroupBy` (site 6b), and the merged source-info token of a data-tag group key | `GROUP_BY_FOLD_LABEL`, `core/operators/group_by.py` | | `join_v1` | the merged source-info token of a key that is a data-tag on several inputs of a `Join` (site 6b) | `JOIN_FOLD_LABEL`, `core/operators/join.py` | @@ -399,6 +400,7 @@ test session with `-p tests.test_hashing.hash_site_trace`. | folds of `Batch` / `GroupBy` | the canonical JSON list of a group's member values, for each system tag | SHA-256 hex after the operation's label: `batch_v1` (`batch.py`), `group_v1` (`group_by.py`); one helper | folded source id and record id | `utils/arrow_utils.py:fold_system_tag_values` | | fold of a derived row's lineage | the canonical JSON array of triples in record-id column-name order, flattened as record-id column name, source-id value, and record-id value | SHA-256 hex after the operation's label, `derived_row_v1` | derived source record id and the corresponding source-info tokens | `core/sources/derived_source.py:DerivedSource._derive_from`, `utils/arrow_utils.py:fold_system_tag_values` | | run snapshot | sorted labelled sink hashes | SHA-256 hex, 16 digits | the run URI `@` (a name) | `pipeline/job.py:PipelineJob._prepare_run`, `pipeline/job.py:PipelineJob._prepare_run..` | +| saved-job publication | canonical saved job JSON with sorted blueprint edges, including bindings and node job content hashes and omitting package versions, the run ID, run status, unbound sources, and advisory row counts | SHA-256, `pipeline_json_v1` | decide whether publishing appends a version | `pipeline/repository.py:_publication_hash` | | user-class identity | a class's identity record | SHA-256 hex prefix | extension name `name@` (a name) | `logical_types/user_class_identity.py:identity_string` | | database registry key | a database config, canonical JSON | SHA-256 hex, 8 digits | `db_` key in a saved job (a name) | `pipeline/serialization.py:DatabaseRegistry._make_key` | | SpiralDB schema table digest | the scope and the rows of a dataset's schema table, canonical JSON with the stored schema bytes | SHA-256 hex | completion marker of the schema table (a checksum of stored rows) | `databases/spiraldb_keyed/schema_table.py:rows_digest` | @@ -439,6 +441,7 @@ test session with `-p tests.test_hashing.hash_site_trace`. | the `_content_hash` column | `core/streams/arrow_table_stream.py:ArrowTableStream._assemble_table..hashes`, `core/function_pod.py:FunctionPodStream.as_table..all_content_hashes`, `core/function_pod.py:FunctionPodStream.head..shown_content_hashes`, `core/function_pod.py:FunctionPodStream.head..`, `core/nodes/function_node.py:FunctionNodeBase.as_table..all_content_hashes`, `core/nodes/function_node.py:FunctionNodeBase._head_of_pairs..`, `side_effects.py:_table_of_rows` | | `__pf_var_function_signature_hash`, `__pf_var_function_content_hash` | `core/data_function.py:function_signature_hash`, `core/data_function.py:function_content_hash`, `core/data_function.py:PythonDataFunction.__init__` | | saved pipeline and job files | `pipeline/graph.py:Pipeline.save`, `pipeline/job.py:PipelineJob.save`, `pipeline/job.py:PipelineJob.as_pipeline`, `core/sources/base.py:RootSource._identity_config` | +| pipeline repository `job_hash` | `pipeline/repository.py:PipelineRepository.publish` | | cached file hashes (in-memory writes compare validated hashes, SQLite and PostgreSQL read and write `b"sha256:" + digest`) | `hashing/hash_cachers.py:InMemoryHashCacher.put`, `hashing/hash_cachers.py:SqliteHashCacher.get`, `hashing/hash_cachers.py:SqliteHashCacher.put`, `hashing/postgres_hash_cacher.py:PostgresHashCacher.get`, `hashing/postgres_hash_cacher.py:PostgresHashCacher.put`, `hashing/file_hashers.py:parse_stored_file_hash`, `hashing/file_hashers.py:serialize_storable_file_hash` | | `InvocationContext.invocation_hash` (`