Scoped-delete semantics for --filter + --delete-unmatched
- Lingua principale
- TypeScript
- Stelle
- 26
- Fork
- 9
- Merge medio
- 1g 3h
- PR unite (30g)
- 20
Descrizione
### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con il comando apiops publish e hasMutuallyExclusivePublishOptions, quindi esamina l’issue #215 per il comportamento fail-fast esistente. Definisci la semantica di scoped-delete per gli alberi di artefatti filtrati, incluse le dipendenze condivise, e documenta o implementa il comportamento concordato affinché le richieste filtrate di Create, Update e Delete siano orchestrate correttamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, typescript
- Ambito
- api, cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Attiva
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100