Fix task log parsing error handling and bump to v0.6.1#123
Merged
fslongjin merged 2 commits intoDragonOS-Community:mainfrom Feb 10, 2026
Merged
Conversation
- 在`task_log`方法中,将直接使用`unwrap`改为使用`match` 进行错误处理,当读取或解析失败时记录警告并返回默认的`TaskLog` - 在`TaskLog`结构体的`build_time`字段上添加`default` 属性,以支持反序列化旧版本中缺失该字段的任务日志 - 添加单元测试`should_deserialize_legacy_task_log_without_build_timestamp` ,确保能正确读取旧格式的任务日志 Signed-off-by: longjin <longjin@dragonos.org>
Signed-off-by: longjin <longjin@DragonOS.org>
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.
fix(cache): 改进任务日志读取的错误处理并添加兼容性测试
task_log方法中,将直接使用unwrap改为使用match进行错误处理,当读取或解析失败时记录警告并返回默认的
TaskLogTaskLog结构体的build_time字段上添加default属性,以支持反序列化旧版本中缺失该字段的任务日志
should_deserialize_legacy_task_log_without_build_timestamp,确保能正确读取旧格式的任务日志