Fix/board type leases parsing - #165
Merged
Merged
Conversation
Add optional `leases` field to `BoardTypeSummary` and introduce `BoardLease` struct to capture per-board lease details (board_id, date_begin, date_end). Extend `render_board_table` to show active leases, with each lease on its own row and proper column alignment. Handle responses without leases gracefully.
Add `format_local_time` utility to convert UTC timestamps to the local time zone and apply it to lease expiry and auth token expiry displays for better readability.
There was a problem hiding this comment.
该 PR 为 ostool board ls 增加每块板的租约列,并将租约和认证令牌的 UTC 到期时间格式化为本地时区。它改变了 CLI 与 ostool-server 的 board-types API 契约;虽然其他构建/运行路径看起来隔离,但租约展示依赖配套服务器提供新字段,当前并未实现。
CI:两个 check (stable, x86_64-unknown-linux-gnu) 均为成功,未发现由本 PR 导致的失败。本地已通过 helper 的 PR 版本核验、git diff --check;环境没有 cargo、rustc、rustfmt 或 clippy,因此无法运行 helper 建议的 cargo fmt --check、cargo clippy --manifest-path ostool/Cargo.toml --all-features -- -D warnings 和 cargo test --manifest-path ostool/Cargo.toml --all-features。
此前没有 review 或 PR 评论需要处理。剩余阻塞问题见行内评论:服务端尚未生成 leases,因此该功能在仓库配套部署中不会显示实际租约。除该问题及相应端到端测试缺口外,未发现其他问题。
Powered by gpt-5.6-terra
Merged
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.
No description provided.