Conversation
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
cleanup warnings.
94ec30f to
0a9b648
Compare
79d90eb to
f0d2bf2
Compare
|
|
Recommend reviewing: as the first commit of this PR is refactoring and cleanup, and contains a large number of files. |
| ref: ${{ env.GITOPS_BRANCH }} | ||
| path: tenant-gitops-e4161f | ||
|
|
||
| - name: Update transitory-documents-api dev image reference |
There was a problem hiding this comment.
update the image name and tag directly in the gitops repo using a file and json key path to target the repository and image tag.
| - name: Load SSH deploy key | ||
| uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0 | ||
| with: | ||
| ssh-private-key: ${{ secrets.TENANT_GITOPS_E4161F_DEPLOY_KEY }} |
There was a problem hiding this comment.
uses a deploy key for authorization.
| @@ -0,0 +1,602 @@ | |||
| //---------------------- | |||
There was a problem hiding this comment.
Generated diff from swagger definition, consistent with our other external api access in JASPER.
| { | ||
| if (!string.IsNullOrEmpty(_accessTokenValue)) | ||
| { | ||
| client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", _accessTokenValue.Replace("Bearer ", "")); |
There was a problem hiding this comment.
Bearer token is appended during prepareRequest phase - will be updating this to be consumed by httpclient responsible for transitory document communication instead.
| /// Lists files matching a wildcard path pattern. | ||
| /// Supports prefix matching for date folders (e.g., "10 OCTOBER/OCTOBER 31*" matches "10 OCTOBER/OCTOBER 31(Fri)"). | ||
| /// </summary> | ||
| private async Task<IReadOnlyList<SmbFileInfo>> ListFilesWithWildcardAsync( |
There was a problem hiding this comment.
Start by navigating directly to the BasePath/Location/Region, but then list all folders in the matched directory in order to do wildcard/case insensitive/multiple date folder formats without needing to make multiple queries.
devinleighsmith
left a comment
There was a problem hiding this comment.
comments for review.
| /// Uses (stack-based) to simplify logic and avoid recursion. | ||
| /// Thread-safe: uses concurrent collections and synchronization primitives. | ||
| /// </summary> | ||
| private async Task<List<SmbFileInfo>> TraverseRoomDirectoriesParallelAsync( |
There was a problem hiding this comment.
When we find a matching room directory, we need to list all files in all subfolders. We do that concurrently to speed up processing time instead of handling this serially. These trees can be nested x levels deep. and each additional level requires another round-trip to/from the smb folder.
| return aggregatedFiles; | ||
| } | ||
|
|
||
| public async Task<Stream> OpenFileAsync(string filePath, CancellationToken cancellationToken = default) |
There was a problem hiding this comment.
Directly open a file for streaming based on the filePath. This is assumed to be the same file path returned from a search result.





Pull Request for JIRA Ticket: ----jasper-342----
jasper-342 - jira.justice.gov.bc.ca/JASPER-342
Description
Introduces transitory documents api client/server and adds support to court file search. Currently gated by feature flag to reduce merge overhead.
How Has This Been Tested?
Tested artificially against the Q: drive. Manually validated names of mappings in unexpected formats.
Validated that existing DARS, document functionality unaffected.
Confirmed that document search and opening Q drive documents functions as expected.
Tested against current Q: drive file structure.
Checklist: