Feature request: allow skipping the delete phase when any publish update fails
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- azure, typescript
調査の方向性
Start with src/services/publish-service.ts, especially the runPublish flow around executePuts and the delete phase, then inspect how resource-level failures are represented in the results. Define how informational skips affect the gate and how skipped deletions appear in human-readable and machine-readable output. Done means the opt-in mode skips all deletions after a failed update, returns a nonzero status, and proceeds with deletions when updates succeed.
索引モデルが issue の本文から書いたものです。
説明
Problem or use case
Some deployment workflows require all planned additions and updates to succeed before the same invocation starts deleting resources.
In the reviewed runPublish implementation, the CLI collects results from executePuts, then enters the requested delete phase without first checking those results for resource-level failures. Errors are aggregated afterward. This is different from a fatal exception or preflight failure that stops the invocation before deletion.
Version reviewed: @azure-tools/apiops-cli 1.0.4. This request is based on source review. The following is a synthetic failure scenario; no claim is made that it has been reproduced against APIM.
Example scenario
One commit:
- Updates Policy P to remove its reference to Named Value N.
- Deletes the artifact for N.
- Deletes the artifact for a separate, independently deletable managed resource R.
Incremental publish runs with --delete-unmatched. Suppose the update of P is recorded as a resource-level failure.
The delete phase can still be entered. A deletion of N might be rejected by APIM while references remain, but service-side reference checks do not provide a general "stop all deletions after an update failure" guarantee. A deletion of R is independent and might still succeed.
This complicates failure handling for workflows whose intended gate is that additions and updates must succeed before any requested deletions start.
Proposed solution
Provide an opt-in publish mode that skips the entire delete phase if any planned addition or update has a failed result.
Suggested behavior:
- Finish or otherwise account for in-flight updates according to the existing execution model.
- Check the collected update results before scheduling deletions.
- If an update failed, do not schedule any deletion, return a nonzero status, and clearly state why deletion was skipped.
- Distinguish skipped deletions from successful deletions in human-readable and machine-readable output.
Normal informational skips should not automatically be treated as failures; their semantics should be documented.
An opt-in mode would allow existing best-effort behavior to remain compatible. This is a phase gate, not a request for rollback, an atomic transaction, or dependency-aware suppression of individual deletions.
Desired outcome
In the example above, a failed update of P prevents deletion attempts for both N and R. A run in which all planned updates succeed proceeds to its requested deletions.
Affected command
apiops publish --delete-unmatched, including incremental publish with --commit-id <sha>
References and related issues
- Update phase followed by deletion and result aggregation, v1.0.4
- Resource-level publish errors returned as failed results, v1.0.4
- #169: Cleanup
--delete-unmatchedbehavior is related at a broad level. This request specifically concerns gating the delete phase on update success.
Please clarify whether a newer release already has an equivalent gate.
- 主要言語
- TypeScript
- スター
- 44
- フォーク
- 14
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Azure/apiops-cli のほかの issue
-
type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 71/100
Azure/apiops-cli#350 ·
-
stale
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
Azure/apiops-cli#333 · コメント 1 件 ·
-
extract fails when a policy uses set-backend-service backend-id="{{namedValue}}"対応中かも @dannyward630 が 37 日前に担当しました。 オープンstale type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Azure/apiops-cli#331 · コメント 1 件 ·
-
Docs example says products are auto-included transitively, but they aren't extracted with `products: []`対応中かも @cdayne が 27 日前に担当しました。 オープンstale type:question
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Azure/apiops-cli#277 · コメント 1 件 ·
-
Extractor mistakes set-body json response as transitive dependency which causes pipeline failureオープンtype:bug
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
Azure/apiops-cli#349 ·
Azure/apiops-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
tashfeenahmed/freellmapi#2217 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
remotion-dev/skills#37 ·
-
gui: a narrow window's gateway key row with a line under it wraps its faded badges onto blank linesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
Slider: Escape during a thumb drag keeps and commits the dragged value, unlike ui-sdk's other dragsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
vercel-labs/ui#1758 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nicobailon/pi-subagents#3425 ·
メンテナーはふだん 1 日以内に返信