Skip to content

Allow network share paths with disk health contributor, better exceptions for WindowsNetworkFileShare #1503

Merged
TimHess merged 4 commits into
mainfrom
fileShare_enhance
Apr 8, 2025
Merged

Allow network share paths with disk health contributor, better exceptions for WindowsNetworkFileShare #1503
TimHess merged 4 commits into
mainfrom
fileShare_enhance

Conversation

@TimHess
Copy link
Copy Markdown
Member

@TimHess TimHess commented Apr 7, 2025

Description

  • Embed Win32Exceptions for WindowsNetworkFileShare connection errors
  • Enhance DiskSpaceHealthContributor to work with Windows network share paths

Resolves #1501, Resolves #1502

Quality checklist

  • Your code complies with our Coding Style.
  • You've updated unit and/or integration tests for your change, where applicable.
  • You've updated documentation for your change, where applicable.
    If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
  • You've added required license files and/or file headers (explaining where the code came from with proper attribution), where code is copied from StackOverflow, a blog, or OSS.

@TimHess TimHess added Component/Management Issues related to Steeltoe Management (actuators) Component/NetworkFileShare Issues related to network file share ReleaseLine/4.x Identified as a feature/fix for the 4.x release line labels Apr 7, 2025
@TimHess TimHess changed the title Allow network share paths with disk health, better exceptions for WindowsNetworkFileShare Allow network share paths with disk health contributor, better exceptions for WindowsNetworkFileShare Apr 7, 2025
- Embed Win32Exceptions for WindowsNetworkFileShare connection errors rather than translating
@TimHess TimHess force-pushed the fileShare_enhance branch from d010eda to 2bdc4e2 Compare April 7, 2025 18:23
@bart-vmware bart-vmware added this to the 4.0.0-rc1 milestone Apr 8, 2025
@bart-vmware
Copy link
Copy Markdown
Member

Please add path to details in the UNKNOWN case. This is what it currently looks like:

image

Whereas it could be:

image

By changing the code to:

var unknownResult = new HealthCheckResult
{
    Status = HealthStatus.Unknown,
    Description = "Failed to determine free disk space.",
    Details =
    {
        ["error"] = "The configured path is invalid or does not exist.",
        
    }
};

if (options.Path != null)
{
    unknownResult.Details["path"] = options.Path;
}

return unknownResult;

TimHess and others added 2 commits April 8, 2025 07:59
Co-authored-by: Bart Koelman <104792814+bart-vmware@users.noreply.github.com>
@TimHess TimHess marked this pull request as ready for review April 8, 2025 14:50
@TimHess TimHess requested a review from bart-vmware April 8, 2025 14:51
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 8, 2025

@TimHess TimHess merged commit 6ba5341 into main Apr 8, 2025
@TimHess TimHess deleted the fileShare_enhance branch April 8, 2025 16:36
tscrypter pushed a commit to tscrypter/steeltoe that referenced this pull request Apr 9, 2025
…ions for WindowsNetworkFileShare (SteeltoeOSS#1503)

* Support network shares with disk health contributor
* Embed Win32Exceptions for WindowsNetworkFileShare connection errors rather than translating

---------

Co-authored-by: Bart Koelman <104792814+bart-vmware@users.noreply.github.com>
tscrypter pushed a commit to tscrypter/steeltoe that referenced this pull request Apr 9, 2025
…ions for WindowsNetworkFileShare (SteeltoeOSS#1503)

* Support network shares with disk health contributor
* Embed Win32Exceptions for WindowsNetworkFileShare connection errors rather than translating

---------

Co-authored-by: Bart Koelman <104792814+bart-vmware@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component/Management Issues related to Steeltoe Management (actuators) Component/NetworkFileShare Issues related to network file share ReleaseLine/4.x Identified as a feature/fix for the 4.x release line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add FileShareHealthContributor WindowsFileShare should use Win32Exception instead of or inside of IOException

2 participants