[BUG] Subscription override warning message (ephemeral storage)

Aperta
#560 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
azure, powershell
Ambito
cloud

Direzione di ricerca

Inizia dal flusso di avvio di Cloud Shell che esegue l’autenticazione con Azure ed emette gli avvisi sulle sottoscrizioni, quindi riproduci il comportamento della sessione effimera usando il comando documentato Update-AzConfig. Il lavoro è completato quando la sottoscrizione predefinita persiste per la sessione oppure l’avviso di override viene soppresso quando la persistenza non è disponibile, senza rimuovere l’avviso relativo a più sottoscrizioni.

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

Descrizione

bug Priority 1

To Reproduce

  1. Follow the steps in https://learn.microsoft.com/en-us/azure/cloud-shell/get-started/ephemeral?tabs=powershell
  2. Use the command in the supplied warning message (Update-AzConfig -DefaultSubscriptionForLogin) to set the default subscription to the desired subscription
  3. Restart the shell

Observed Behavior

Requesting a Cloud Shell.Succeeded. 
Connecting terminal...

Your Cloud Shell session will be ephemeral so no files or system changes will persist beyond your current session.

MOTD: SqlServer has been updated to Version 22!

VERBOSE: Authenticating to Azure ...
WARNING: TenantId '{my tenant id}' contains more than one active subscription. First one will be selected for further use. To select another subscription, use Set-AzContext.
WARNING: To override which subscription Connect-AzAccount selects by default, use `Update-AzConfig -DefaultSubscriptionForLogin 00000000-0000-0000-0000-000000000000`. Go to https://go.microsoft.com/fwlink/?linkid=2200610 for more information.
VERBOSE: Building your Azure drive ...

Expected behavior

Ideally, I would love the default subscription configuration to persist through the ephemeral session.

That being said, I understand that there are limitations to the ephemeral cloud shell. If the setting cannot be persisted, the override warning should be suppressed as to not misdirect ephemeral cloud shell users. (That warning and the message about "no files or system changes" appear to be at odds)

Is this specific to Cloud Shell?

Not sure how to answer this question, since it seems to be an edge case interaction between Azure Powershell and Azure Cloud Shell. I don't believe that this issue would make sense in the Azure Powershell repo (as it is a specific quirk of the ephemeral implementation of Azure Cloud Shell).

Interface information

How are you accessing Cloud Shell - portal.azure.com
If a browser, which Operating System and browser are you using? Firefox on Windows 11

Additional context

I know this is maybe a minor gripe, but it's definitely confusing, especially as a new user, to be prompted with a warning whose instructions do not resolve the issue.

I have no issue with the first warning message (re: multiple subscriptions), and I definitely think that the first warning is important to have regardless of whether this issue is resolved by suppressing the second warning or incorporating some way to persist the default subscription selection.

Lingua principale
PowerShell
Stelle
273
Fork
116
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 Azure/CloudShell

Tutte le issue di Azure/CloudShell

Issue simili

Altre issue su Cloud

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.