Skip to content

Fix compliance findings in Frends.AzureDataLake.DownloadFiles (v2.0.0) - #29

Open
MichalFrends1 with Copilot wants to merge 12 commits into
mainfrom
copilot/fix-compliance-findings-another-one
Open

Fix compliance findings in Frends.AzureDataLake.DownloadFiles (v2.0.0)#29
MichalFrends1 with Copilot wants to merge 12 commits into
mainfrom
copilot/fix-compliance-findings-another-one

Conversation

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Resolves all 8 Frends task analyzer findings (FT0007, FT0008, FT0011×2, FT0014, FT0015, FT0018×2) and upgrades the target framework to net8.0.

Breaking changes

  • DownloadFiles method signature: Source and Destination are no longer top-level [PropertyTab] parameters — they're now properties of a new Input class (fixes FT0007, FT0018)
  • Result.IsSuccessResult.Success; Result.ErrorMessage removed in favour of a structured Result.Error object (Error.Message, Error.AdditionalInfo) (fixes FT0011)

Before:

AzureDataLake.DownloadFiles(source, destination, options, cancellationToken);
result.IsSuccess; result.ErrorMessage;

After:

AzureDataLake.DownloadFiles(new Input { Source = source, Destination = destination }, options, cancellationToken);
result.Success; result.Error?.Message;

Other changes

  • Options.ErrorMessageOnFailure added — custom error message surfaced on failure (fixes FT0015)
  • CancellationToken parameter renamed tokencancellationToken (fixes FT0008)
  • Constants class and enum members documented with XML summaries (fixes FT0014)
  • Helpers/ErrorHandler.cs added following the standard Frends error-handling pattern; error handling in the task method updated accordingly
  • ErrorHandlingTests replaced with ErrorHandlerTest covering throw-on-failure, return-on-failure, and custom error message scenarios
  • Both projects retargeted to net8.0; version bumped to 2.0.0

…sion 2.0.0

- Target net8.0 in both csproj files
- Add Input class wrapping Source and Destination (fixes FT0018, FT0007)
- Rename IsSuccess to Success, remove ErrorMessage, add Error object (fixes FT0011)
- Add ErrorMessageOnFailure to Options (fixes FT0015)
- Add summary docs to Constants (fixes FT0014)
- Rename cancellation token param to cancellationToken (fixes FT0008)
- Add Helpers/ErrorHandler.cs following standard pattern
- Update all test call sites to use new API
- Replace ErrorHandlingTests with ErrorHandlerTest
- Bump version to 2.0.0 (breaking change), update CHANGELOG.md

Co-authored-by: MichalFrends1 <167774394+MichalFrends1@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix compliance findings in Frends.AzureDataLake.DownloadFiles Fix compliance findings in Frends.AzureDataLake.DownloadFiles (v2.0.0) Aug 13, 2026
Copilot AI requested a review from MichalFrends1 August 13, 2026 06:42
Added example usage for AdditionalInfo property.
Added example to the Error property documentation.
…on; remove Source/Destination classes

- Input now directly contains all Azure Data Lake connection fields (was in Source)
- New Connection class contains destination directory and overwrite flag (was in Destination)
- Deleted Source.cs and Destination.cs
- Updated DownloadFiles.cs private helpers to operate on Input/Connection directly
- Updated all test files to use new flat Input/Connection API
- Changed all [ExpectedException(typeof(FormatException/RequestFailedException/...))] to [ExpectedException(typeof(Exception), AllowDerivedTypes = true)]

Co-authored-by: MichalFrends1 <167774394+MichalFrends1@users.noreply.github.com>
Copilot AI and others added 2 commits August 13, 2026 08:50
…nput class in DownloadFiles

Co-authored-by: MichalFrends1 <167774394+MichalFrends1@users.noreply.github.com>
… parameter structure

Co-authored-by: MichalFrends1 <167774394+MichalFrends1@users.noreply.github.com>
Co-authored-by: MichalFrends1 <167774394+MichalFrends1@users.noreply.github.com>
@MichalFrends1
MichalFrends1 marked this pull request as ready for review August 13, 2026 11:24

@MatteoDelOmbra MatteoDelOmbra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove AllowDerivedTypes in all tests- we always return System.Exception

@MichalFrends1

Copy link
Copy Markdown
Contributor

@copilot Please address the review comments and make the requested changes

Co-authored-by: MichalFrends1 <167774394+MichalFrends1@users.noreply.github.com>

Copilot AI commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please address the review comments and make the requested changes

Addressed in commit 80c473f by removing AllowDerivedTypes = true from DownloadFiles tests that assert System.Exception.

/// </summary>
/// <example>c:\temp</example>
[DisplayFormat(DataFormatString = "Text")]
public string Directory { get; init; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@MichalFrends1 lets specify in parameter name that this id destination directory

/// </summary>
/// <example>*.txt</example>
[DefaultValue("*.txt")]
public string FilePattern { get; init; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@MichalFrends1 lets specify that this is a full path pattern from SOURCE

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