Improve Extract and Publish log readability
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript
- 领域
- cli
调研方向
从 tests/integration/all-resource-types/basicv2-test.log 开始,然后比较 src/cli/extract-command.ts、src/services/publish-service.ts、src/cli/publish-command.ts 和 src/clients/apim-client.ts 中相关的输出路径。跟踪提取、发布和重试目前如何记录其工作。完成的标准是:输出涵盖所提议的分组、计时、摘要和重试上下文改进,且不遗漏 API。
由索引模型根据 Issue 内容生成。
描述
Summary
Feedback on the integration test logs (tests/integration/all-resource-types/basicv2-test.log) identified several readability and usability improvements for the Extract and Publish command output.
Proposed Improvements
Extract Command (src/cli/extract-command.ts)
-
Group resources by dependency tier — The "Extracted N Type(s)" lines are a flat list with no visual hierarchy. Group by tier or add blank lines between categories.
-
List all APIs in the detail section — Currently only APIs with specs/operations are shown (7 of 12). APIs like
src-graphql-syntheticandsrc-a2a-weather-agentare silently omitted. List all APIs even if minimal. -
Add elapsed time to the Total line —
Total: 96 resources extracted, 0 errorsshould include duration (e.g.,in 12.3s).
Publish Command (src/services/publish-service.ts, src/cli/publish-command.ts)
-
Add tier/phase headers — All PUTs are a single flat stream. Since publish executes in dependency tiers, add headers:
── Tier 1: Independent resources (16) ── PUT namedvalue/src-nv-plain ... ── Tier 2: Resources with dependencies (2) ── PUT backend/src-backend-pool -
Add elapsed time — No indication of how long publish took or which resources were slow. Add per-tier or total timing.
-
Enrich the summary —
41 creates/updates, 0 deletes, 1 skippedcould also show total elapsed time and retry count (e.g., "6 retries across 2 resources").
Retry Logging (src/clients/apim-client.ts)
-
Round retry delay values —
retrying after 1175.1730686888397ms→retrying in 1.2s -
Include resource context in retry warnings — Currently no indication of which resource triggered the retry.
-
Include attempt number — e.g.,
(attempt 2/5)so readers know retry progress. -
Reduce retry noise in output — Retries interleave with PUT lines and break the flow. Consider grouping retries under their resource or suppressing intermediate retries (show only final outcome with retry count).
Files to Modify
src/cli/extract-command.ts— items 1–3src/services/publish-service.ts— items 4–6src/cli/publish-command.ts— items 5–6src/clients/apim-client.ts— items 7–10
Related
Based on review of tests/integration/all-resource-types/basicv2-test.log
- 主要语言
- TypeScript
- 星标
- 29
- 派生
- 10
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 22
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/apiops-cli 的其他 Issue
-
type:question
难度 2/5 1-3 小时 新手友好度 76/100
Azure/apiops-cli#277 ·
-
type:documentation
难度 1/5 1 小时以内 新手友好度 94/100
Azure/apiops-cli#250 ·
-
Documentation P2
难度 2/5 1-3 小时 新手友好度 70/100
Azure/apiops-cli#24 · 1 条评论 ·
-
type:bug
难度 4/5 3-5 天 新手友好度 55/100
Azure/apiops-cli#291 ·
-
type:bug
难度 3/5 1-2 天 新手友好度 58/100
Azure/apiops-cli#276 ·
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
copse-dev/agent-pane#2953 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
难度 2/5 1-3 小时 新手友好度 78/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
calcite-components needs triage refactor
难度 2/5 1-3 小时 新手友好度 75/100
Esri/calcite-design-system#15203 ·