Azure / Azure/apiops-cli

Scoped-delete semantics for --filter + --delete-unmatched

未关闭
#275 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
type:feature
主要语言
TypeScript
星标
26
派生
9
平均合并
1 天 3 小时
30 天内合并 PR
20

描述

### Problem or use case

In #215, combining `--filter` with `--delete-unmatched` was intentionally left to fail fast until
scoped-delete semantics are designed:

> Combining `--filter` with `--delete-unmatched` should fail fast with a clear error until
> scoped-delete semantics are designed.

Designing and enabling that combination would allow deletion tracking for a filtered subset of the
artifact tree, rather than requiring a full-tree `--delete-unmatched` run just to track any
deletions at all.

### Proposed solution

Is there a plan or timeline for designing scoped-delete semantics, or a place to follow along?

As a workaround, expanding the following:

```diff
export function hasMutuallyExclusivePublishOptions(
deleteUnmatched: boolean,
_commitId?: string,
hasFilter = false
): boolean {
- return deleteUnmatched && hasFilter;
+ return deleteUnmatched && hasFilter && !_commitId;
}
```

produced correctly-scoped create/update/delete requests when tested against a simple,
self-contained API with no shared dependencies, but this doesn't address resources with shared dependencies that would need more thoughtful deletion orchestration.

### Affected command

apiops publish

贡献指南

打开贡献指南

调研方向

Start with the apiops publish command and hasMutuallyExclusivePublishOptions, then review issue #215 for the existing fail-fast behavior. Define scoped-delete semantics for filtered artifact trees, including shared dependencies, and document or implement the agreed behavior so filtered create, update, and delete requests are correctly orchestrated.

由索引模型根据 Issue 内容生成。

评估

技术栈
azure, typescript
领域
api, cli
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。