Azure / Azure/apiops-cli

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

Ouverte
#275 2 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
type:feature
Langage dominant
TypeScript
Étoiles
26
Forks
9
Merge moyen
1 j 3 h
PR mergées (30 j)
20

Description

### 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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
azure, typescript
Domaine
api, cli
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Active
Clarté
À clarifier
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.