HackPoint opened a new pull request, #46316:
URL: https://github.com/apache/arrow/pull/46316

   ### Enhancement: Apache Arrow Flight Middleware in C#
   
   #### Overview
   This Pull Request enhances middleware support for Apache Arrow Flight using 
C#, focusing on improved metadata header management and propagation for better 
observability and extensibility. It also provides handling for HTTP/HTTPS 
communication.
   
   #### Rationale for this Change
   Effective middleware is critical for managing metadata headers, ensuring 
accurate request/response handling, and simplifying debugging in distributed 
systems. By improving middleware capabilities, we enhance reliability and 
observability, significantly benefiting developers and operational teams 
managing complex Flight-based applications.
   
   #### What's Included in this PR?
   - Middleware enhancements supporting complete metadata header propagation.
   - Middleware lifecycle hooks for better request/response management.
   - Comprehensive integration tests validating middleware functionality.
   - Documentation updates reflecting middleware improvements.
   
   #### Key Features
   - **Complete Header Propagation:** Ensures accurate propagation of gRPC 
metadata headers throughout middleware lifecycle events.
   - **HTTP/HTTPS Handling:** Supports middleware integration and metadata 
propagation for HTTP and HTTPS communications.
   - **Middleware Lifecycle Management:** Supports reliable middleware hooks 
(`OnBeforeSendingHeaders`, `OnHeadersReceived`, `OnCallCompleted`).
   - **Enhanced Testing:** Adds comprehensive integration tests to verify 
correct middleware behavior.
   
   #### Impact
   - Improves middleware reliability and simplifies debugging.
   - Enhances transparency in gRPC and HTTP/S communication within Flight-based 
applications.
   
   #### Are These Changes Tested?
   
   **Testing Overview**
   
   **Unit Tests:**
   - Added tests for middleware lifecycle event execution (e.g., 
`OnBeforeSendingHeaders`, `OnHeadersReceived`, `OnCallCompleted`).
   - Verified internal logic for capturing and storing gRPC metadata headers.
   
   **Integration Tests:**
   - Tested end-to-end with a real Flight client and in-memory server setup.
   - Validated propagation of custom headers (e.g., `x-server-header`, 
`Set-Cookie`) between client and server.
   
   **End-to-End Tests:**
   - Simulated real-world Flight requests to ensure headers are processed 
consistently across middleware layers.
   - Confirmed correct invocation order and middleware behavior under different 
server responses.
   
   **Example Test Cases:**
   - Verify that `OnHeadersReceived` correctly captures server-sent headers.
   - Ensure custom client middleware modifies request headers as expected.
   - Validate that `OnCallCompleted` is triggered on both success and error 
cases.
   
   #### Checklist
   - [x] Implementation completed
   - [x] Tests added and passing
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to