Skip to content

feat: Add recursiveFetchLogicalFiles#4407

Merged
GordonSmith merged 1 commit into
hpcc-systems:candidate-3.x.xfrom
GordonSmith:GH-4392-SF_LF_COUNT
Jul 2, 2025
Merged

feat: Add recursiveFetchLogicalFiles#4407
GordonSmith merged 1 commit into
hpcc-systems:candidate-3.x.xfrom
GordonSmith:GH-4392-SF_LF_COUNT

Conversation

@GordonSmith
Copy link
Copy Markdown
Member

@GordonSmith GordonSmith commented Jun 30, 2025

Fixes #4392

Checklist:

  • The commit message is properly formatted and free of typos.
    • The commit message title makes sense in a changelog, by itself.
    • The commit message includes a "fixes" reference if appropriate.
    • The commit is signed.
  • The change has been fully tested:
    • I have viewed all related gallery items
    • I have viewed all related dermatology items
  • There are no similar instances of the same problem that should be addressed
    • I have addressed them here
    • I have raised new issues to address them separately

Testing:

@GordonSmith GordonSmith requested review from Copilot and jeclrsg June 30, 2025 13:38
Copy link
Copy Markdown

Copilot AI left a 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 PR introduces a new recursiveFetchLogicalFiles method to enhance the DFUService by recursively retrieving logical file information. Key changes include:

  • Adding the recursiveFetchLogicalFiles function in DFUService for fetching logical files recursively.
  • Extending the LogicalFile class with a fetchAllLogicalFiles method that utilizes the new recursive function.
  • Including a new (currently skipped) test case to validate the recursive fetching behavior.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/comms/tests/wsDFU.spec.ts Added a skipped test for recursive fetching of logical files.
packages/comms/src/services/wsDFU.ts Introduced recursiveFetchLogicalFiles to recursively fetch logical files.
packages/comms/src/ecl/logicalFile.ts Added a convenience method that wraps the new recursive fetching logic.
Comments suppressed due to low confidence (3)

packages/comms/src/services/wsDFU.ts:18

  • The recursiveFetchLogicalFiles method expects objects with 'NodeGroup' and 'Name' properties, but the recursive call uses 'childSuperFiles', whose type may not fully align. Consider unifying the data types or mapping the LogicalFile instance properly before recursion.
    async recursiveFetchLogicalFiles(superFiles: { NodeGroup: string, Name: string }[]): Promise<string[]> {

packages/comms/src/ecl/logicalFile.ts:180

  • Passing 'this' (a LogicalFile instance) into recursiveFetchLogicalFiles may lead to a type mismatch if LogicalFile doesn't exactly match { NodeGroup: string, Name: string }. Consider mapping 'this' to the expected shape.
        return this.connection.recursiveFetchLogicalFiles([this]);

packages/comms/tests/wsDFU.spec.ts:24

  • [nitpick] The test for recursiveFetch is currently skipped; please re-enable it once the functionality is stable to ensure comprehensive test coverage for the new recursive fetching behavior.
    it.skip("recursiveFetch", async function () {

@GordonSmith
Copy link
Copy Markdown
Member Author

@jeclrsg can you review

Copy link
Copy Markdown
Contributor

@jeclrsg jeclrsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GordonSmith asked about the new test being marked as to be skipped

Comment thread packages/comms/tests/wsDFU.spec.ts
Fixes hpcc-systems#4392

Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
@GordonSmith GordonSmith force-pushed the GH-4392-SF_LF_COUNT branch from d5475c1 to 9ade578 Compare July 2, 2025 16:36
@GordonSmith GordonSmith merged commit ae0ae6e into hpcc-systems:candidate-3.x.x Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants