kbs: print the config guide when fail to parse#184
Merged
jialez0 merged 1 commit intoJun 9, 2026
Conversation
Collaborator
|
@jialez0 ,您好,您的请求已接收,请耐心等待结果。 |
Collaborator
|
@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
f17ca8f to
58c0961
Compare
Collaborator
|
@jialez0 ,您好,您的请求已接收,请耐心等待结果。 |
Collaborator
|
@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
Now the configuration varies when there are breaking changes upon the code. This commit gives a better way to tell the user if the config is wrong. It will raise an error with a link to the relevant section of the KBS configuration documentation. Adapted from confidential-containers/trustee 9f1c010cfe60931323abb025195a4f16b76edbe0. The hint table is adjusted to this fork's KBS config schema: the doc link points to openanolis/trustee's kbs/docs/config.md, the coco-only `storage_backend` section is dropped, and the fork-specific `policy_engine` section is added. No existing API/config/CLI is changed; the new behaviour only affects the error message printed when config parsing already fails. Signed-off-by: Jiale Zhang <xinjian.zjl@alibaba-inc.com>
58c0961 to
ee7a883
Compare
Collaborator
|
@jialez0 ,您好,您的请求已接收,请耐心等待结果。 |
Collaborator
|
@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
吸收上游 confidential-containers/trustee 的「配置解析失败时打印配置指引」改进,提升 KBS 配置出错时的可诊断性。
9f1c010c(kbs: print the config guide when fail to parse)改动内容
kbs/src/config.rs:KbsConfig加载/反序列化失败时,错误信息附带指向 KBS 配置文档对应小节的链接。kbs/Cargo.toml:新增const_format = "0.2.36"。适配说明(相对上游)
kbs/docs/config.md(pin 到 commit6cae09a2)。storage_backend,加入本 fork 的policy_engine。兼容性
验证
cargo check -p kbs通过。