Skip to content

Conversation

@Duslia
Copy link
Member

@Duslia Duslia commented Feb 19, 2025

What type of PR is this?

feat

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

在合并编译场景下,支持特定的 ctx key 传递给下游

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: Service-Inline is a form of ByteDance's internal service integration, running the upstream and downstream within the same process.. However, to ensure isolation and consistency with RPC calls, the ctx key passed during Service-Inline must conform to the metainfo specification. However, since it's within a single process, data can be stored within a specific key, and the downstream can simply assert this structure for use. This reduces serialization compared to passing data via IDL.
Note: Due to package isolation, using this feature requires ensuring that the package of the passed structure is isolated.

zh(optional): 合并编译是字节跳动内部服务合并的一种形态,将上游和下游运行在同一个进程内。但是为了隔离性以及与 RPC 调用时的一致性,合并编译传递的 ctx key 需要满足 metainfo 规范。然而既然在一个进程内,可以将一些数据塞到特定的 key 中,下游直接断言出来这个结构体使用就可以。相比通过 IDL 传递来说,可以减少序列化的次数。
注意:由于包的隔离性,使用该 feature 时必须保证传递的结构体的包时可以被隔离的。

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@Duslia Duslia requested review from a team as code owners February 19, 2025 06:58
@codecov
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.37%. Comparing base (3c0b00f) to head (b01196e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1709   +/-   ##
=======================================
  Coverage   61.36%   61.37%           
=======================================
  Files         388      388           
  Lines       35028    35030    +2     
=======================================
+ Hits        21496    21498    +2     
+ Misses      12243    12239    -4     
- Partials     1289     1293    +4     
Flag Coverage Δ
integration 50.40% <0.00%> (+0.13%) ⬆️
unit 51.50% <100.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Duslia Duslia force-pushed the feat/support_custom_key branch from ce3c451 to 3fb96d9 Compare August 8, 2025 07:56
@Duslia Duslia changed the title [WIP]feat: support custom ctx key to pass in servicei inline feat: support custom ctx key to pass in Service-Inline Aug 8, 2025
@Duslia Duslia changed the title feat: support custom ctx key to pass in Service-Inline feat: support custom ctx key to pass to downstream in Service-Inline Aug 8, 2025
@Duslia Duslia force-pushed the feat/support_custom_key branch from 3fb96d9 to af2007a Compare August 26, 2025 09:01
@Duslia Duslia changed the base branch from develop to main August 26, 2025 09:01
@Duslia Duslia force-pushed the feat/support_custom_key branch from af2007a to b01196e Compare September 11, 2025 05:51
@YangruiEmma YangruiEmma merged commit df576e3 into cloudwego:main Sep 11, 2025
22 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants