Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/DownloadObject_build_and_test_on_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ jobs:
uses: FrendsPlatform/FrendsTasks/.github/workflows/build_main.yml@main
with:
workdir: Frends.AmazonS3.DownloadObject
strict_analyzers: true
env_var_name_1: HiQ_AWSS3Test_AccessKey
env_var_name_2: HiQ_AWSS3Test_BucketName
env_var_name_3: HiQ_AWSS3Test_SecretAccessKey
secrets:
badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }}
env_var_value_1: ${{ secrets.HIQ_AWSS3TEST_ACCESSKEY }}
env_var_value_2: ${{ secrets.HIQ_AWSS3TEST_BUCKETNAME }}
env_var_value_3: ${{ secrets.HIQ_AWSS3TEST_SECRETACCESSKEY }}
env_var_value_3: ${{ secrets.HIQ_AWSS3TEST_SECRETACCESSKEY }}
3 changes: 2 additions & 1 deletion .github/workflows/DownloadObject_build_and_test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
uses: FrendsPlatform/FrendsTasks/.github/workflows/build_test.yml@main
with:
workdir: Frends.AmazonS3.DownloadObject
strict_analyzers: true
env_var_name_1: HiQ_AWSS3Test_AccessKey
env_var_name_2: HiQ_AWSS3Test_BucketName
env_var_name_3: HiQ_AWSS3Test_SecretAccessKey
Expand All @@ -21,4 +22,4 @@ jobs:
test_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }}
env_var_value_1: ${{ secrets.HIQ_AWSS3TEST_ACCESSKEY }}
env_var_value_2: ${{ secrets.HIQ_AWSS3TEST_BUCKETNAME }}
env_var_value_3: ${{ secrets.HIQ_AWSS3TEST_SECRETACCESSKEY }}
env_var_value_3: ${{ secrets.HIQ_AWSS3TEST_SECRETACCESSKEY }}
3 changes: 2 additions & 1 deletion .github/workflows/DownloadObject_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ jobs:
uses: FrendsPlatform/FrendsTasks/.github/workflows/release.yml@main
with:
workdir: Frends.AmazonS3.DownloadObject
strict_analyzers: true
env_var_name_1: HiQ_AWSS3Test_AccessKey
env_var_name_2: HiQ_AWSS3Test_BucketName
env_var_name_3: HiQ_AWSS3Test_SecretAccessKey
secrets:
feed_api_key: ${{ secrets.TASKS_FEED_API_KEY }}
env_var_value_1: ${{ secrets.HIQ_AWSS3TEST_ACCESSKEY }}
env_var_value_2: ${{ secrets.HIQ_AWSS3TEST_BUCKETNAME }}
env_var_value_3: ${{ secrets.HIQ_AWSS3TEST_SECRETACCESSKEY }}
env_var_value_3: ${{ secrets.HIQ_AWSS3TEST_SECRETACCESSKEY }}
55 changes: 54 additions & 1 deletion Frends.AmazonS3.DownloadObject/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,57 @@
# Changelog
# Changelog

## [3.0.0] - 2025-07-17

## [Breaking] Major refactoring - restructured parameters into Input, Connection, and Options classes with improved error handling

### Breaking Changes
- **Parameter Structure Reorganization**: Task parameters have been restructured into three main classes:
- **Input**: Contains core task parameters (BucketName, SourceDirectory, SearchPattern, DownloadFromCurrentDirectoryOnly, TargetDirectory)
- **Connection**: Contains connection-related parameters (AwsCredentials, PreSignedUrl)
- **Options**: Contains optional configuration parameters (FileLockedRetries, DeleteSourceObject, ThrowErrorIfNoMatch, ActionOnExistingFile, ThrowErrorOnFailure, ErrorMessageOnFailure)

### Parameter Changes
- **Moved to Input tab**:
- `Connection.BucketName` → `Input.BucketName`
- `Connection.S3Directory` → `Input.SourceDirectory` (renamed)
- `Connection.SearchPattern` → `Input.SearchPattern`
- `Connection.DownloadFromCurrentDirectoryOnly` → `Input.DownloadFromCurrentDirectoryOnly`
- `Connection.DestinationDirectory` → `Input.TargetDirectory` (renamed)

- **Moved to Options tab**:
- `Connection.FileLockedRetries` → `Options.FileLockedRetries`
- `Connection.DeleteSourceObject` → `Options.DeleteSourceObject`
- `Connection.ThrowErrorIfNoMatch` → `Options.ThrowErrorIfNoMatch`
- `Connection.DestinationFileExistsAction` → `Options.ActionOnExistingFile` (renamed)

- **Updated in Connection tab**:
- `Connection.AWSCredentials` → `Connection.AwsCredentials` (renamed)
- `Connection.PreSignedURL` → `Connection.PreSignedUrl` (renamed)

### New Features
- **Enhanced Error Handling**: Added comprehensive error handling with new Options properties:
- `ThrowErrorOnFailure` (bool, default: false) - Controls whether errors throw exceptions
- `ErrorMessageOnFailure` (string, default: "") - Custom error message for failures
- **Improved Result Structure**:
- Renamed `Data` property to `Objects` in Result class
- Added structured `Error` property with `Message` and `AdditionalInfo` fields
- **Error Handler Helper**: New static ErrorHandler class for consistent error processing

### Migration Guide
To upgrade to the new version:
1. **Input tab**: Select the same values for BucketName, SourceDirectory (previously S3Directory), SearchPattern, DownloadFromCurrentDirectoryOnly, and TargetDirectory (previously DestinationDirectory) as they were in the Connection tab
2. **Options tab**: Configure FileLockedRetries, DeleteSourceObject, ThrowErrorIfNoMatch, and ActionOnExistingFile (previously DestinationFileExistsAction) with the same values as they were in the Connection tab
3. **Connection tab**: Update references to AwsCredentials (previously AWSCredentials) and PreSignedUrl (previously PreSignedURL)
4. **Result handling**: Update code that references `result.Data` to use `result.Objects` instead
5. **Error handling**: Consider setting `ThrowErrorOnFailure` to true and providing custom `ErrorMessageOnFailure` if needed

### Technical Improvements
- Separated concerns by organizing parameters into logical groups (Input, Connection, Options)
- Implemented consistent error handling pattern following Frends task guidelines
- Added proper error reporting with structured Error objects
- Improved naming consistency (AWS → Aws, URL → Url)
- Enhanced maintainability and testability with better class structure


## [2.2.0] - 2024-12-11
### Updated
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
Expand Down
Loading
Loading