Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Refactor actuator middleware (separation of concerns) #1474

Merged
merged 6 commits into from
Feb 18, 2025

Conversation

bart-vmware
Copy link
Member

@bart-vmware bart-vmware commented Feb 14, 2025

Description

Refactor actuator middleware: move parsing of request (body) into separate virtual method, so that handler invocation is agnostic of HttpContext.

EndpointMiddleware.InvokeEndpointHandlerAsync used to take an HttpContext parameter, which has changed to TRequest. The newly added method ParseRequestAsync takes HttpContext as input and returns a TRequest.

The public API diff is minimal; this is mostly about aligning internals for a better separation of concerns.

Additionally, this PR includes several commits regarding naming consistency that I've found while documenting public API changes.

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.

@bart-vmware bart-vmware added Component/Management Issues related to Steeltoe Management (actuators) Warn/api-change The APIs were changed ReleaseLine/4.x Identified as a feature/fix for the 4.x release line labels Feb 14, 2025
@bart-vmware bart-vmware added this to the 4.0.0-beta1 milestone Feb 14, 2025
@bart-vmware bart-vmware force-pushed the middleware-refactoring branch from 586a3f8 to 4646dd4 Compare February 14, 2025 16:26
@bart-vmware bart-vmware changed the title Refactor actuator middleware Refactor actuator middleware (separation of concerns) Feb 14, 2025
@bart-vmware bart-vmware marked this pull request as ready for review February 14, 2025 20:36
@bart-vmware bart-vmware requested a review from TimHess February 14, 2025 20:36
@bart-vmware bart-vmware force-pushed the middleware-refactoring branch from b396287 to db908f0 Compare February 18, 2025 14:03
Copy link
Member

@TimHess TimHess left a comment

Choose a reason for hiding this comment

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

LGTM

@bart-vmware bart-vmware merged commit 2c076c5 into main Feb 18, 2025
23 checks passed
@bart-vmware bart-vmware deleted the middleware-refactoring branch February 18, 2025 14:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Component/Management Issues related to Steeltoe Management (actuators) ReleaseLine/4.x Identified as a feature/fix for the 4.x release line Warn/api-change The APIs were changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants