A container registry that uses the AT Protocol for manifest storage and S3 for blob storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

need repohead

+4 -9
+4 -9
pkg/hold/pds/xrpc.go
··· 303 303 path := fmt.Sprintf("%s/%s", collection, rkey) 304 304 305 305 // Get the record (this will log all accessed blocks in the MST path) 306 - recordCID, _, err := tempRepo.GetRecordBytes(r.Context(), path) 306 + _, _, err = tempRepo.GetRecordBytes(r.Context(), path) 307 307 if err != nil { 308 308 http.Error(w, fmt.Sprintf("failed to get record: %v", err), http.StatusNotFound) 309 309 return ··· 312 312 // Get all blocks that were accessed during record retrieval 313 313 blocks := loggingBS.GetLoggedBlocks() 314 314 315 - // Log block count for debugging 316 - fmt.Printf("sync.getRecord: Retrieved %d blocks for record at %s/%s\n", len(blocks), collection, rkey) 317 - for i, blk := range blocks { 318 - fmt.Printf(" Block %d: CID=%s, size=%d bytes\n", i+1, blk.Cid().String(), len(blk.RawData())) 319 - } 320 - 321 315 // Write CAR file with all accessed blocks 322 316 w.Header().Set("Content-Type", "application/vnd.ipld.car") 323 317 324 318 // Create a buffer to write the CAR data 325 319 var buf bytes.Buffer 326 320 327 - // Create CAR header with the record CID as root 321 + // Create CAR header with the repo head as root (not the record CID) 322 + // The CAR file represents a slice of the repo from head to record 328 323 header := &car.CarHeader{ 329 - Roots: []cid.Cid{recordCID}, 324 + Roots: []cid.Cid{repoHead}, 330 325 Version: 1, 331 326 } 332 327