Skip to content

Conversation

gaius-qi
Copy link
Member

Description

This pull request introduces changes to enhance the handling of response headers in the dragonfly-client by adding support for a new task ID header and updating relevant functions to incorporate this header. The changes primarily focus on improving the clarity and functionality of the response headers.

Enhancements to response header handling:

  • Added a new response header constant: Introduced DRAGONFLY_TASK_ID_HEADER to represent the task ID in response headers, along with documentation explaining its purpose. (dragonfly-client/src/proxy/header.rs, dragonfly-client/src/proxy/header.rsL82-R90)

  • Updated make_response_headers function: Modified the function to accept a task_id parameter and include the DRAGONFLY_TASK_ID_HEADER in the response headers. (dragonfly-client/src/proxy/mod.rs, [1] [2]

Refactoring to integrate the new header:

  • Adjusted proxy_via_dfdaemon function: Updated the function to pass the task_id to make_response_headers for constructing the response headers. (dragonfly-client/src/proxy/mod.rs, dragonfly-client/src/proxy/mod.rsL771-R774)

Related Issue

Motivation and Context

Screenshots (if appropriate)

Signed-off-by: Gaius <gaius.qi@gmail.com>
@gaius-qi gaius-qi added this to the v2.4.0 milestone Jul 24, 2025
@gaius-qi gaius-qi self-assigned this Jul 24, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner July 24, 2025 10:12
@gaius-qi gaius-qi added the enhancement New feature or request label Jul 24, 2025
Copy link
Contributor

@LunaWhispers LunaWhispers left a comment

Choose a reason for hiding this comment

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

lgtm

@LunaWhispers LunaWhispers enabled auto-merge (squash) July 24, 2025 10:13
Copy link

codecov bot commented Jul 24, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 47.24%. Comparing base (45f8622) to head (2f8d650).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
dragonfly-client/src/proxy/mod.rs 0.00% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1256      +/-   ##
==========================================
- Coverage   47.26%   47.24%   -0.02%     
==========================================
  Files          60       60              
  Lines       14582    14588       +6     
==========================================
  Hits         6892     6892              
- Misses       7690     7696       +6     
Files with missing lines Coverage Δ
dragonfly-client/src/proxy/header.rs 92.07% <ø> (ø)
dragonfly-client/src/proxy/mod.rs 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@chlins chlins left a comment

Choose a reason for hiding this comment

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

lgtm

@LunaWhispers LunaWhispers merged commit bf6f49e into main Jul 24, 2025
9 checks passed
@LunaWhispers LunaWhispers deleted the feature/task-id branch July 24, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants