Skip to content

Accept file path in sdk instead of bytes#60

Merged
mateeullahmalik merged 1 commit intomasterfrom
update/sdk-params
May 14, 2025
Merged

Accept file path in sdk instead of bytes#60
mateeullahmalik merged 1 commit intomasterfrom
update/sdk-params

Conversation

@mateeullahmalik
Copy link
Collaborator

No description provided.

Copy link
Contributor

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 changes the cascade task creation API to accept a file path instead of raw bytes, aligning the implementation with new file-based data handling.

  • Changed function signatures and internal implementations across the SDK and adapter to use file paths.
  • Updated test files to reflect the new parameter type, with one client test file removed.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/system/e2e_cascade_test.go Updated invocation to use file path instead of data bytes.
sdk/task/manager.go Modified CreateCascadeTask signature and usage to accept filePath.
sdk/task/cascade.go Updated CascadeTask to store filePath and pass it to NewCascadeTask.
sdk/adapters/supernodeservice/types.go Updated request structure to use filePath.
sdk/adapters/supernodeservice/adapter.go Added file handling logic for reading data in chunks.
sdk/action/client.go Updated StartCascade signature and error message to use file path.
sdk/action/client_test.go Removed entire set of tests, potentially reducing test coverage.
Comments suppressed due to low confidence (1)

sdk/action/client_test.go:1

  • The complete removal of this test file reduces overall test coverage for the StartCascade functionality; please ensure that equivalent tests are added to validate the new file path-based behavior.
package action

c.logger.Error(ctx, "Empty data provided")
if filePath == "" {
c.logger.Error(ctx, "Empty file path provided")
return "", ErrEmptyData
Copy link

Copilot AI May 13, 2025

Choose a reason for hiding this comment

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

The error returned for an empty file path still uses ErrEmptyData, which may cause confusion; consider defining and using a distinct ErrEmptyFilePath constant.

Suggested change
return "", ErrEmptyData
return "", ErrEmptyFilePath

Copilot uses AI. Check for mistakes.
@mateeullahmalik mateeullahmalik merged commit a3634cd into master May 14, 2025
7 checks passed
@mateeullahmalik mateeullahmalik deleted the update/sdk-params branch May 14, 2025 09:29
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