Retrieve complete acknowledged run artifact bundles - #32
Kevin Cho (chokevin) wants to merge 5 commits into
Conversation
Replace temporary PVC-reader pods with a generation-bound bundle contract and direct Azure Blob retrieval. Have tau-core stamp trusted non-secret transport metadata and fail closed across staged publication, metrics, and checkpoints.
| if outputDir == "." || strings.TrimSpace(resultPVC) == "" || !outputWritable { | ||
| return artifactbundle.Runtime{}, nil | ||
| } | ||
| if outputDir != "/data" && !strings.HasPrefix(outputDir, "/data/") { |
There was a problem hiding this comment.
P1 storage.output: /data is accepted here. PVCRelativePath("/data") becomes an empty prefix, so run get --destination passes "" to Blob listing and downloads every object in the container. Require a strict descendant of /data and reject an empty bundle prefix before listing.
| } | ||
| checkpointCheck := "" | ||
| if strings.TrimSpace(runtime.CheckpointIndex) != "" { | ||
| checkpointCheck = fmt.Sprintf(`if [ ! -f %s ] || |
There was a problem hiding this comment.
P1 A missing declared checkpoint is intentionally non-fatal in artifactindex (it exits 0), but this wrapper then exits 126 because no index exists, turning a successful workload into a failed one. Treat an absent index as “no bundle acknowledgement” without changing the payload exit status; keep 126 for malformed or mismatched existing indexes.
Make artifact manifest shell quoting explicit
|
|
||
| rayJob := &unstructured.Unstructured{} | ||
| rayJob.SetGroupVersionKind(schema.GroupVersionKind{Group: "ray.io", Version: "v1", Kind: "RayJob"}) | ||
| if _, err := mgr.GetRESTMapper().RESTMapping(rayJob.GroupVersionKind().GroupKind(), rayJob.GroupVersionKind().Version); err != nil { |
There was a problem hiding this comment.
P1 Returning success on NoMatch permanently skips the RayJob controller when the CRD is installed after tau-core starts; setup is only called once, so later RayJobs never get artifact-store metadata until restart. Retry discovery/register after the CRD appears, or fail startup so setup is retried.
Summary
Temporary PVC-reader Pods made artifact retrieval depend on ad hoc cluster mutation and treated a shared directory as if it were a completion contract. This change adds a generation-bound bundle acknowledgement after staged publication, checkpoint indexing, and metrics offload, then makes
tau run get <name> --destination DIRverify and download that complete bundle directly from Azure Blob storage.The tau-core controller stamps trusted, non-secret Blob transport metadata on Tau-managed Jobs and RayJobs, so workspace users do not need cluster-scoped PV access. Retrieval fails closed on missing or mismatched acknowledgements, storage listing errors, untrusted endpoints, size mismatches, and destination collisions. This PR was prepared with AI assistance and the resulting implementation and tests were reviewed and run locally.
Related issue
N/A
Validation
Compatibility and operational impact
tau run get --destination DIRfor complete acknowledged bundles on/data-backed single-pod Jobs and RayJobs. Existing single-artifact and listing behavior remains available where practical..tau/bundlesfiles are additive.Checklist