Describe the issue.
Documents from models that inherit from AbstractStateDocument (FloridaDocument, NYCoADocument, and TexasDocument) are currently stored in S3 using state_pdf_path from cl/search/state/shared.py:
us/state/<state_code>/<court_id>/gov.<state_code>.<court_id>.<slug><ext>
We want to move these files to the same path structure we use for RECAP documents, using a directory per docket:
recap/gov.uscourts.<court_id>.<cl_docket_id>/gov.uscourts.<court_id>.<cl_docket_id>.<x>.<x><ext>
Where <cl_docket_id> is the CourtListener docket PK, not the PACER case ID.
Document naming
For RECAP, we use <document_number>.<attachment_number> for the <x>.<x> part.
State docket entries don't have equivalent fields. Florida uses UUIDs, New York has entry_index, and Texas has sequence_number.
We need something that is unique within the docket. I think we can use:
<docket_entry_id>.<document_id>
using the CL PKs.
This needs to be unique because in the follow-up migration we'll do raw S3 copies, where the incrementing storage won't protect us from collisions.
Tasks
Notes
- This issue only changes the path for new files. Existing files will be moved in a separate issue.
- The
recap/ prefix will now be shared between RECAP and state documents.
Related Issue
No response
Screenshots
No response
What type of issue is this?
Research
Describe the issue.
Documents from models that inherit from
AbstractStateDocument(FloridaDocument,NYCoADocument, andTexasDocument) are currently stored in S3 usingstate_pdf_pathfromcl/search/state/shared.py:We want to move these files to the same path structure we use for RECAP documents, using a directory per docket:
Where
<cl_docket_id>is the CourtListener docket PK, not the PACER case ID.Document naming
For RECAP, we use
<document_number>.<attachment_number>for the<x>.<x>part.State docket entries don't have equivalent fields. Florida uses UUIDs, New York has
entry_index, and Texas hassequence_number.We need something that is unique within the docket. I think we can use:
using the CL PKs.
This needs to be unique because in the follow-up migration we'll do raw S3 copies, where the incrementing storage won't protect us from collisions.
Tasks
<x>.<x>naming.AbstractStateDocument.state_pdf_pathto use the new path.us/state/.Notes
recap/prefix will now be shared between RECAP and state documents.Related Issue
No response
Screenshots
No response
What type of issue is this?
Research