Accept file path in sdk instead of bytes#60
Merged
mateeullahmalik merged 1 commit intomasterfrom May 14, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
j-rafique
approved these changes
May 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.