Skip to content

tar_path_target() for CAS repositories #1532

@noamross

Description

@noamross

Prework

  • I understand and agree to help guide.
  • I understand and agree to contributing guide.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.

Proposal

Currently tar_path_targets() always points to <TARGETS_STORE_DIR>/objects/<TARGET_NAME>, even when using tar_repository_cas(), where it is clearly not correct. This precludes workflows that act directly on the serialized target object, like random access to parquet files or otherwise using the files directly (e.g., #1505).

I propose that, for CAS repositories, tar_path_targets() use an optional path method defined in tar_repository_cas. It would be a function with a single argument key, and return a length-ne string that is the path to that key. If the method is empty, just return NULL. Since the CAS may use any kind of key-value store, the key may not be a valid file path, and it would be up the user and the CAS creator to define what it means and how it could be used. For instance, an S3-based CAS might return s3://the-bucket/the-key.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions