-
Notifications
You must be signed in to change notification settings - Fork 81
24632 Document Record Service Cont. In Integration #3141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature-drs-integration
Are you sure you want to change the base?
24632 Document Record Service Cont. In Integration #3141
Conversation
doug-lovett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
|
Are we moving away from the minio file upload in legal-api? then we need to update COOP file upload (rules and memorandum) in various filings and dissolution and court order file upload. |
Yes, we are replacing Minio with Document Record Service, but for now Continuation In only as a Proof of Concept. |
|
doug-lovett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
cameron-eyds
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me sir
Just like the UI side, we will want to think about ways to get this into dev without hindering current workflows, leaving in a feature branch will only get more cumbersome as time goes on!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request integrates the Document Record Service across the codebase by adding a new service, updating document-related endpoints, and modifying validations to use the new file validation function.
- Introduces DocumentRecordService with new methods for document upload, deletion, download, and business identifier update.
- Updates filing processors and validations to transition from pdf‐based validation to DRS file validation.
- Adds environment variable configuration and new API endpoints to support DRS operations.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| queue_services/entity-filer/src/entity_filer/filing_processors/continuation_in.py | Updates filing processor to update business identifier via DRS. |
| legal-api/src/legal_api/services/filings/validations/continuation_in.py | Replaces calls to validate_pdf with validate_file_on_drs for file validation. |
| legal-api/src/legal_api/services/filings/validations/common_validations.py | Adds the new validate_file_on_drs helper using DocumentRecordService. |
| legal-api/src/legal_api/services/document_record.py | Implements the DocumentRecordService with DRS operations. |
| legal-api/src/legal_api/resources/v2/document.py and business_documents.py | Introduces new endpoints and logic for handling DRS documents. |
| legal-api/src/legal_api/constants.py | Adds enums for document class and type for use with DRS integration. |
| legal-api/src/legal_api/config.py | Adds new environment variables for DRS settings. |
Comments suppressed due to low confidence (1)
legal-api/src/legal_api/constants.py:24
- The trailing comma in the 'CNTO' enum value may result in a tuple instead of the intended string. Remove the comma to ensure the value is a string.
DocumentTypeEnum(Enum):\n CNTO = 'CNTO',
|
|
||
| try: | ||
| response = requests.patch( | ||
| url, json={ 'consumerIdentifer': business_identifier }, |
Copilot
AI
May 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The key 'consumerIdentifer' is misspelled; it should be 'consumerIdentifier'. Additionally, the exception logging message below incorrectly references deletion instead of an update.
| url, json={ 'consumerIdentifer': business_identifier }, | |
| url, json={ 'consumerIdentifier': business_identifier }, |
|
|
||
| return msg | ||
|
|
||
| def validate_file_on_drs(document_class: str, document_service_id: str, path) -> bool: |
Copilot
AI
May 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return type annotation '-> bool' does not match the implementation which returns a list of errors. Consider updating the annotation to Optional[list] or a similar appropriate type.
| def validate_file_on_drs(document_class: str, document_service_id: str, path) -> bool: | |
| def validate_file_on_drs(document_class: str, document_service_id: str, path) -> list: |
thorwolpert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing changes to https://github.com/bcgov/lear/tree/main/queue_services/business-filer


Issue #: /bcgov/entity#24632
Description of changes:
document_recordServiceBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).