Improve Extract and Publish log readability

オープン
#162 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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 の本文から書いたものです。

説明

Enhancement P2

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)
  1. 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.

  2. List all APIs in the detail section — Currently only APIs with specs/operations are shown (7 of 12). APIs like src-graphql-synthetic and src-a2a-weather-agent are silently omitted. List all APIs even if minimal.

  3. Add elapsed time to the Total lineTotal: 96 resources extracted, 0 errors should include duration (e.g., in 12.3s).

Publish Command (src/services/publish-service.ts, src/cli/publish-command.ts)
  1. 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
    
  2. Add elapsed time — No indication of how long publish took or which resources were slow. Add per-tier or total timing.

  3. Enrich the summary41 creates/updates, 0 deletes, 1 skipped could also show total elapsed time and retry count (e.g., "6 retries across 2 resources").

Retry Logging (src/clients/apim-client.ts)
  1. Round retry delay valuesretrying after 1175.1730686888397msretrying in 1.2s

  2. Include resource context in retry warnings — Currently no indication of which resource triggered the retry.

  3. Include attempt number — e.g., (attempt 2/5) so readers know retry progress.

  4. 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–3
  • src/services/publish-service.ts — items 4–6
  • src/cli/publish-command.ts — items 5–6
  • src/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時間
マージ済み PR(30日)
22

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/apiops-cli のほかの issue

Azure/apiops-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。