Support pipeline input by property name

Aperta
#222 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
powershell
Ambito
cli

Direzione di ricerca

Start by reviewing issue #83 and its alias convention, then inspect the cmdlet files in one feature folder to see their parameter blocks and begin/process/end blocks. Add pipeline binding and per-object handling for a Get → Remove pair, including ShouldProcess behavior, and add unit tests for that pair. Done means objects bind by their id and workspaceId properties, each pipeline object is processed, and -WhatIf/-Confirm behave correctly.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
Problem description

Follow-up from #83. Today you can't pipe objects between FabricTools cmdlets:

Get-FabricLakehouse -WorkspaceId $ws | Remove-FabricLakehouse   # does not bind

The objects the Fabric API returns already have id, displayName and, for items, workspaceId. The cmdlets just don't accept those properties from the pipeline. Only about 10 cmdlets use ValueFromPipelineByPropertyName today.

Suggested solution

Build on the alias convention from #83 (<Noun>Id → Id, <Noun>Name → Name, DisplayName):

  1. Add ValueFromPipelineByPropertyName = $true to:
    • the resource <Noun>Id parameter (binds through the Id alias to the id property)
    • the parent WorkspaceId parameter (binds to the workspaceId property)
  2. Move the cmdlet bodies into process {} blocks wherever they currently run only in begin or end, so each object in the pipeline is handled.
  3. Make sure -WhatIf / -Confirm (SupportsShouldProcess) behave correctly for each object in the pipeline in Remove-* and Update-* cmdlets.
  4. Add unit tests that cover pipeline input for at least one Get → Remove pair per feature area.
Dependencies

This needs the #83 aliases to be in place for each feature folder first. It can be rolled out folder by folder in the same way.

Lingua principale
PowerShell
Stelle
60
Fork
18
Merge medio
11h 38m
PR unite (30g)
26

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dataplat/FabricTools

Tutte le issue di dataplat/FabricTools

Issue simili

Altre issue su CLI

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.