logs/traces: `--since 5` (missing unit) silently searches from 2001
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- bun, node.js, typescript
- 领域
- cli, observability
调研方向
从 src/handlers/observability/time.ts 中的 parseTimeString 开始,检查纯数字字符串在传递给 Date.parse 之前是如何处理的。添加拒绝不支持的纯数字并显示预期的无效时间提示的逻辑,然后运行相关的 logs 和 traces 测试。完成标准是:5、60 和 45 等值会产生无效时间错误,同时受支持的格式仍能正常工作。
由索引模型根据 Issue 内容生成。
描述
Description
--since / --until on the logs and traces commands accept 5m, 1h, ISO 8601, epoch ms or
now. A bare number shorter than 13 digits is not rejected: parseTimeString
(src/handlers/observability/time.ts) passes it to Date.parse, which reads it leniently as a
calendar date. So a forgotten unit turns into a window decades long, or a confusing error.
Steps to Reproduce
agentcore runtime logs --id <runtime-id> --since 5(meant5m).agentcore runtime logs --id <runtime-id> --since 60.agentcore runtime logs --id <runtime-id> --since 45.
Expected Behavior
Invalid time string: "5". Use relative durations (5m, 1h, 2d), ISO 8601, epoch ms, or "now".
Actual Behavior
- Searches from 2001-05-01 (
Date.parse("5")). - Searches from 1960-01-01.
- Fails with
--since must resolve to a time before --until("45"is 2045-01-01).
("30" happens to be rejected, because V8 cannot parse it.)
CLI Version
1.2.0 (current v1.x, a6452a4)
Operating System
Linux
Additional Context
Same under Node 22 and Bun 1.4 (the npm bundle and the compiled binaries).
- 主要语言
- TypeScript
- 星标
- 339
- 派生
- 129
- 平均合并
- 19 小时 21 分钟
- 30 天内合并 PR
- 125
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws/agentcore-cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
aws/agentcore-cli#2939 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
aws/agentcore-cli#2938 ·
维护者通常 1 天内回复
-
invoke: CUSTOM_JWT runtime errors discard the response body and error type (e.g. "Token has expired")可能已有人在做 @n1dhruv 于 6 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
aws/agentcore-cli#2875 · 1 条评论 ·
维护者通常 1 天内回复
-
--debug has no effect; service error name, HTTP status and request ID never reach the terminal可能已有人在做 @abhiramshaji-cyber 于 3 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
aws/agentcore-cli#2874 ·
维护者通常 1 天内回复
-
`agentcore dev` container fails with LoginTokenLoadError when using `aws login` credentials可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 80/100
aws/agentcore-cli#2606 · 4 条评论 ·
维护者通常 1 天内回复
查看 aws/agentcore-cli 的全部 Issue
相似的 Issue
-
bot:ai-assisted component:faucet status:untriaged
难度 2/5 1-3 小时 新手友好度 78/100
midnightntwrk/midnight-faucet-api#222 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
bluesky-social/social-app#12545 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
knaw-huc/textannoviz#742 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
cloudflare/realtimekit-ui#219 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
cdklabs/cdk-nextjs#365 ·
维护者通常 1 天内回复